diff --git a/internal/room/tools/definitions.go b/internal/room/tools/definitions.go index 5144a67..e1cdec9 100644 --- a/internal/room/tools/definitions.go +++ b/internal/room/tools/definitions.go @@ -127,4 +127,39 @@ var FileTools = []openai.Tool{ }`, }, }, + { + Type: openai.ToolTypeFunction, + Function: &openai.FunctionDefinition{ + Name: "git_status", + Description: "查看 Git 工作区状态", + Parameters: `{"type": "object", "properties": {}}`, + }, + }, + { + Type: openai.ToolTypeFunction, + Function: &openai.FunctionDefinition{ + Name: "git_diff", + Description: "查看文件变更", + Parameters: `{ + "type": "object", + "properties": { + "filename": {"type": "string", "description": "文件名"} + } + }`, + }, + }, + { + Type: openai.ToolTypeFunction, + Function: &openai.FunctionDefinition{ + Name: "git_commit", + Description: "提交更改", + Parameters: `{ + "type": "object", + "properties": { + "message": {"type": "string", "description": "提交信息"} + }, + "required": ["message"] + }`, + }, + }, }