feat: tools (#1180)

* feat: tools

* feat: claude use tools

* feat: openai use tools
This commit is contained in:
yetone
2025-02-05 22:39:54 +08:00
committed by GitHub
parent 1726d32778
commit 1437f319d2
17 changed files with 1321 additions and 74 deletions

View File

@@ -31,6 +31,7 @@ struct TemplateContext {
selected_code: Option<String>,
project_context: Option<String>,
diagnostics: Option<String>,
system_info: Option<String>,
}
// Given the file name registered after add, the context table in Lua, resulted in a formatted
@@ -54,6 +55,7 @@ fn render(state: &State, template: &str, context: TemplateContext) -> LuaResult<
selected_code => context.selected_code,
project_context => context.project_context,
diagnostics => context.diagnostics,
system_info => context.system_info,
})
.map_err(LuaError::external)
.unwrap())