assistant_tools: Rename FileToolInput
to NowToolInput
(#25456)
Renamed the `FileToolInput` structure to `NowToolInput` to better reflect its purpose, as the tool is related to time-based operations. Release Notes: - N/A Signed-off-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
This commit is contained in:
parent
72a9429ef6
commit
bc941bfc97
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ pub enum Timezone {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
|
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
|
||||||
pub struct FileToolInput {
|
pub struct NowToolInput {
|
||||||
/// The timezone to use for the datetime.
|
/// The timezone to use for the datetime.
|
||||||
timezone: Timezone,
|
timezone: Timezone,
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ impl Tool for NowTool {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn input_schema(&self) -> serde_json::Value {
|
fn input_schema(&self) -> serde_json::Value {
|
||||||
let schema = schemars::schema_for!(FileToolInput);
|
let schema = schemars::schema_for!(NowToolInput);
|
||||||
serde_json::to_value(&schema).unwrap()
|
serde_json::to_value(&schema).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ impl Tool for NowTool {
|
||||||
_window: &mut Window,
|
_window: &mut Window,
|
||||||
_cx: &mut App,
|
_cx: &mut App,
|
||||||
) -> Task<Result<String>> {
|
) -> Task<Result<String>> {
|
||||||
let input: FileToolInput = match serde_json::from_value(input) {
|
let input: NowToolInput = match serde_json::from_value(input) {
|
||||||
Ok(input) => input,
|
Ok(input) => input,
|
||||||
Err(err) => return Task::ready(Err(anyhow!(err))),
|
Err(err) => return Task::ready(Err(anyhow!(err))),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue