| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | package claudetool |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | "encoding/json" |
| 6 | |
| 7 | "sketch.dev/ant" |
| 8 | ) |
| 9 | |
| 10 | // The Think tool provides space to think. |
| 11 | var Think = &ant.Tool{ |
| 12 | Name: thinkName, |
| 13 | Description: thinkDescription, |
| 14 | InputSchema: ant.MustSchema(thinkInputSchema), |
| 15 | Run: thinkRun, |
| 16 | } |
| 17 | |
| 18 | const ( |
| 19 | thinkName = "think" |
| 20 | thinkDescription = `Think out loud, take notes, form plans. Has no external effects.` |
| 21 | |
| 22 | // If you modify this, update the termui template for prettier rendering. |
| 23 | thinkInputSchema = ` |
| 24 | { |
| 25 | "type": "object", |
| 26 | "required": ["thoughts"], |
| 27 | "properties": { |
| 28 | "thoughts": { |
| 29 | "type": "string", |
| 30 | "description": "The thoughts, notes, or plans to record" |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | ` |
| 35 | ) |
| 36 | |
| 37 | func thinkRun(ctx context.Context, m json.RawMessage) (string, error) { |
| 38 | return "recorded", nil |
| 39 | } |