mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 09:04:21 +01:00
dave: fix bugs
fixed some bugs i introduced during the refactor Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -3131,7 +3131,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostrdb"
|
name = "nostrdb"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
source = "git+https://github.com/damus-io/nostrdb-rs?rev=dd0d18e637388ae1ef344a9544801acbb3a41bfe#dd0d18e637388ae1ef344a9544801acbb3a41bfe"
|
source = "git+https://github.com/damus-io/nostrdb-rs?rev=e70f9b96efabb3448d182202a23156334c46f801#e70f9b96efabb3448d182202a23156334c46f801"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
"cc",
|
"cc",
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ log = "0.4.17"
|
|||||||
nostr = { version = "0.37.0", default-features = false, features = ["std", "nip49"] }
|
nostr = { version = "0.37.0", default-features = false, features = ["std", "nip49"] }
|
||||||
nwc = "0.39.0"
|
nwc = "0.39.0"
|
||||||
mio = { version = "1.0.3", features = ["os-poll", "net"] }
|
mio = { version = "1.0.3", features = ["os-poll", "net"] }
|
||||||
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "dd0d18e637388ae1ef344a9544801acbb3a41bfe" }
|
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "e70f9b96efabb3448d182202a23156334c46f801" }
|
||||||
#nostrdb = "0.6.1"
|
#nostrdb = "0.6.1"
|
||||||
notedeck = { path = "crates/notedeck" }
|
notedeck = { path = "crates/notedeck" }
|
||||||
notedeck_chrome = { path = "crates/notedeck_chrome" }
|
notedeck_chrome = { path = "crates/notedeck_chrome" }
|
||||||
|
|||||||
@@ -320,12 +320,12 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr
|
|||||||
let entry = all_tool_calls.entry(tool.index).or_default();
|
let entry = all_tool_calls.entry(tool.index).or_default();
|
||||||
|
|
||||||
if let Some(id) = &tool.id {
|
if let Some(id) = &tool.id {
|
||||||
entry.id().get_or_insert(id);
|
entry.id_mut().get_or_insert(id.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(name) = tool.function.as_ref().and_then(|f| f.name.as_ref())
|
if let Some(name) = tool.function.as_ref().and_then(|f| f.name.as_ref())
|
||||||
{
|
{
|
||||||
entry.name().get_or_insert(name);
|
entry.name_mut().get_or_insert(name.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(argchunk) =
|
if let Some(argchunk) =
|
||||||
|
|||||||
@@ -45,10 +45,18 @@ impl PartialToolCall {
|
|||||||
self.id.as_deref()
|
self.id.as_deref()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn id_mut(&mut self) -> &mut Option<String> {
|
||||||
|
&mut self.id
|
||||||
|
}
|
||||||
|
|
||||||
pub fn name(&self) -> Option<&str> {
|
pub fn name(&self) -> Option<&str> {
|
||||||
self.name.as_deref()
|
self.name.as_deref()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn name_mut(&mut self) -> &mut Option<String> {
|
||||||
|
&mut self.name
|
||||||
|
}
|
||||||
|
|
||||||
pub fn arguments(&self) -> Option<&str> {
|
pub fn arguments(&self) -> Option<&str> {
|
||||||
self.arguments.as_deref()
|
self.arguments.as_deref()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user