Skip to content

Commit b483728

Browse files
committed
feat: add aggregated search views
1 parent 4308758 commit b483728

23 files changed

Lines changed: 1633 additions & 253 deletions

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.39.1
4+
5+
### Patch Changes
6+
7+
- Add round, session, and project aggregation views for global search, support Boolean scoped search syntax, and improve session round counting plus agent trace rendering.
8+
39
## 0.39.0
410

511
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lovcode",
33
"private": true,
4-
"version": "0.39.0",
4+
"version": "0.39.1",
55
"type": "module",
66
"packageManager": "pnpm@10.18.1",
77
"scripts": {

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lovcode"
3-
version = "0.39.0"
3+
version = "0.39.1"
44
description = "A Tauri App"
55
authors = ["you"]
66
edition = "2021"

src-tauri/src/app/agent_harness.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,21 @@ fn json_event_type(raw: &Value) -> Option<String> {
270270
fn json_item_id(raw: &Value) -> Option<String> {
271271
json_string(raw, &["id", "message_id", "item_id"])
272272
.or_else(|| raw.get("message").and_then(|v| json_string(v, &["id"])))
273-
.or_else(|| raw.get("event")?.get("message").and_then(|v| json_string(v, &["id"])))
273+
.or_else(|| {
274+
raw.get("event")?
275+
.get("message")
276+
.and_then(|v| json_string(v, &["id"]))
277+
})
274278
.or_else(|| raw.get("item").and_then(|v| json_string(v, &["id"])))
275279
.or_else(|| raw.get("payload").and_then(|v| json_string(v, &["id"])))
276280
}
277281

278282
fn json_role(raw: &Value) -> Option<String> {
279-
if let Some(item_type) = raw.get("item").and_then(|item| item.get("type")).and_then(Value::as_str) {
283+
if let Some(item_type) = raw
284+
.get("item")
285+
.and_then(|item| item.get("type"))
286+
.and_then(Value::as_str)
287+
{
280288
return match item_type {
281289
"agent_message" => Some("assistant".to_string()),
282290
"command_execution" | "file_change" | "mcp_tool_call" | "web_search" | "todo_list" => {

src-tauri/src/app/agent_runtime.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,14 @@ pub(crate) async fn fetch_npm_versions_with_downloads(
354354
.build()
355355
.unwrap_or_default();
356356

357-
let versions = futures::future::join_all(
358-
NPM_REGISTRY_FALLBACKS
359-
.iter()
360-
.map(|registry| fetch_npm_versions_from_registry(&client, registry, package_name, limit)),
361-
)
362-
.await
363-
.into_iter()
364-
.find(|versions| !versions.is_empty())
365-
.unwrap_or_default();
357+
let versions =
358+
futures::future::join_all(NPM_REGISTRY_FALLBACKS.iter().map(|registry| {
359+
fetch_npm_versions_from_registry(&client, registry, package_name, limit)
360+
}))
361+
.await
362+
.into_iter()
363+
.find(|versions| !versions.is_empty())
364+
.unwrap_or_default();
366365

367366
let downloads_package = package_name.replace('/', "%2F");
368367
let downloads_map: std::collections::HashMap<String, u64> = match client

src-tauri/src/app/core.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@ pub(crate) fn create_schema() -> Schema {
137137
schema_builder.add_text_field("project_id", STRING | STORED);
138138
schema_builder.add_text_field("project_path", STRING | STORED);
139139
schema_builder.add_text_field("session_id", STRING | STORED);
140-
schema_builder.add_text_field("session_summary", text_options);
140+
schema_builder.add_text_field("session_summary", text_options.clone());
141141
schema_builder.add_text_field("timestamp", STRING | STORED);
142+
schema_builder.add_u64_field("line_number", STORED);
143+
schema_builder.add_u64_field("round_index", STORED);
144+
schema_builder.add_text_field("round_prompt", text_options.clone());
145+
schema_builder.add_text_field("round_timestamp", STRING | STORED);
142146
schema_builder.build()
143147
}
144148

0 commit comments

Comments
 (0)