Land release blocker fixes and workspace cleanup
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled

This commit is contained in:
2026-04-23 00:16:09 +01:00
parent d7363cc913
commit 9b0067b4c0
36 changed files with 1529 additions and 418 deletions

View File

@@ -226,7 +226,9 @@ async fn list_transcripts_tool(pool: &SqlitePool, args: Value) -> Result<Value,
})
.collect();
Ok(text_content(serde_json::to_string_pretty(&summaries).unwrap()))
Ok(text_content(
serde_json::to_string_pretty(&summaries).unwrap(),
))
}
async fn get_transcript_tool(pool: &SqlitePool, args: Value) -> Result<Value, JsonRpcError> {
@@ -288,7 +290,9 @@ async fn search_transcripts_tool(pool: &SqlitePool, args: Value) -> Result<Value
})
.collect();
Ok(text_content(serde_json::to_string_pretty(&summaries).unwrap()))
Ok(text_content(
serde_json::to_string_pretty(&summaries).unwrap(),
))
}
async fn list_tasks_tool(pool: &SqlitePool) -> Result<Value, JsonRpcError> {
@@ -311,7 +315,9 @@ async fn list_tasks_tool(pool: &SqlitePool) -> Result<Value, JsonRpcError> {
})
.collect();
Ok(text_content(serde_json::to_string_pretty(&summaries).unwrap()))
Ok(text_content(
serde_json::to_string_pretty(&summaries).unwrap(),
))
}
fn text_content(text: String) -> Value {
@@ -404,7 +410,10 @@ mod tests {
let pool = sqlx::SqlitePool::connect("sqlite::memory:").await.unwrap();
let response = handle_message(&pool, request).await.expect("has response");
let tools = response.result.expect("ok")["tools"].as_array().unwrap().clone();
let tools = response.result.expect("ok")["tools"]
.as_array()
.unwrap()
.clone();
let names: Vec<String> = tools
.iter()
.map(|tool| tool["name"].as_str().unwrap().to_string())
@@ -426,7 +435,9 @@ mod tests {
assert_eq!(resp.jsonrpc, "2.0");
assert_eq!(resp.id, Value::Null);
assert!(resp.result.is_none());
let err = resp.error.expect("parse_error_response must carry an error");
let err = resp
.error
.expect("parse_error_response must carry an error");
assert_eq!(err.code, -32700);
assert!(err.message.contains("Parse error"));
assert!(err.message.contains("expected value"));
@@ -449,7 +460,9 @@ mod tests {
});
let pool = sqlx::SqlitePool::connect("sqlite::memory:").await.unwrap();
kon_storage::migrations::run_migrations(&pool).await.unwrap();
kon_storage::migrations::run_migrations(&pool)
.await
.unwrap();
let response = handle_message(&pool, request).await.expect("has response");
assert!(