(appId string)
| 280 | } |
| 281 | |
| 282 | func GetBuilderListFilesToolDefinition(appId string) uctypes.ToolDefinition { |
| 283 | return uctypes.ToolDefinition{ |
| 284 | Name: "builder_list_files", |
| 285 | DisplayName: "List App Files", |
| 286 | Description: fmt.Sprintf("List all files in app %s", appId), |
| 287 | ToolLogName: "builder:list_files", |
| 288 | Strict: false, |
| 289 | InputSchema: map[string]any{ |
| 290 | "type": "object", |
| 291 | "properties": map[string]any{}, |
| 292 | "additionalProperties": false, |
| 293 | }, |
| 294 | ToolCallDesc: func(input any, output any, toolUseData *uctypes.UIMessageDataToolUse) string { |
| 295 | return "listing files" |
| 296 | }, |
| 297 | ToolAnyCallback: func(input any, toolUseData *uctypes.UIMessageDataToolUse) (any, error) { |
| 298 | result, err := waveappstore.ListAllAppFiles(appId) |
| 299 | if err != nil { |
| 300 | return nil, err |
| 301 | } |
| 302 | |
| 303 | return result, nil |
| 304 | }, |
| 305 | } |
| 306 | } |
no test coverage detected