mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 10:21:16 +08:00
fix: parse tool_use/tool_result messages and add OpenCode SQLite backend (#1401)
* fix: parse tool_use/tool_result messages and add OpenCode SQLite backend - Claude: reclassify user messages containing tool_result as "tool" role - Codex: handle function_call and function_call_output payload types - Gemini: support array content and toolCalls extraction, filter info/error types - OpenCode: add SQLite session scan, load and delete alongside legacy JSON - utils: extend parse_timestamp_to_ms for integer timestamps, extract tool_use/tool_result in shared extract_text * fix: address remaining issues from tool_use/tool_result parsing commit - Claude: fix role misclassification for mixed user+tool_result messages (any → all) - OpenCode: extract duplicate part text logic into extract_part_text() - OpenCode: add path validation for SQLite delete to prevent foreign DB access - OpenCode: wrap SQLite deletion in transaction for atomicity - openclaw_config: remove redundant as_deref() on Option<&str>
This commit is contained in:
@@ -294,7 +294,7 @@ impl OpenClawConfigDocument {
|
||||
|
||||
if let Some(existing) = key_value_pairs
|
||||
.iter_mut()
|
||||
.find(|pair| json5_key_name(&pair.key).as_deref() == Some(key))
|
||||
.find(|pair| json5_key_name(&pair.key) == Some(key))
|
||||
{
|
||||
existing.value = new_value;
|
||||
return Ok(());
|
||||
|
||||
Reference in New Issue
Block a user