@kenkaiiii/ggcoder 2.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/cli.js +12 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +1 -0
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/compaction/compactor.d.ts +8 -2
  7. package/dist/core/compaction/compactor.d.ts.map +1 -1
  8. package/dist/core/compaction/compactor.js +147 -18
  9. package/dist/core/compaction/compactor.js.map +1 -1
  10. package/dist/core/custom-commands.d.ts +13 -0
  11. package/dist/core/custom-commands.d.ts.map +1 -0
  12. package/dist/core/custom-commands.js +40 -0
  13. package/dist/core/custom-commands.js.map +1 -0
  14. package/dist/core/event-bus.d.ts +4 -0
  15. package/dist/core/event-bus.d.ts.map +1 -1
  16. package/dist/core/event-bus.js.map +1 -1
  17. package/dist/core/logger.d.ts +1 -0
  18. package/dist/core/logger.d.ts.map +1 -1
  19. package/dist/core/logger.js +6 -0
  20. package/dist/core/logger.js.map +1 -1
  21. package/dist/core/model-registry.d.ts +7 -0
  22. package/dist/core/model-registry.d.ts.map +1 -1
  23. package/dist/core/model-registry.js +21 -3
  24. package/dist/core/model-registry.js.map +1 -1
  25. package/dist/core/oauth/anthropic.d.ts.map +1 -1
  26. package/dist/core/oauth/anthropic.js +6 -4
  27. package/dist/core/oauth/anthropic.js.map +1 -1
  28. package/dist/core/process-manager.js +3 -3
  29. package/dist/core/process-manager.js.map +1 -1
  30. package/dist/core/prompt-commands.d.ts +14 -0
  31. package/dist/core/prompt-commands.d.ts.map +1 -0
  32. package/dist/core/prompt-commands.js +475 -0
  33. package/dist/core/prompt-commands.js.map +1 -0
  34. package/dist/core/settings-manager.d.ts +2 -0
  35. package/dist/core/settings-manager.d.ts.map +1 -1
  36. package/dist/core/settings-manager.js +3 -1
  37. package/dist/core/settings-manager.js.map +1 -1
  38. package/dist/index.d.ts +0 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +0 -2
  41. package/dist/index.js.map +1 -1
  42. package/dist/system-prompt.d.ts.map +1 -1
  43. package/dist/system-prompt.js +9 -5
  44. package/dist/system-prompt.js.map +1 -1
  45. package/dist/ui/App.d.ts +15 -1
  46. package/dist/ui/App.d.ts.map +1 -1
  47. package/dist/ui/App.js +272 -24
  48. package/dist/ui/App.js.map +1 -1
  49. package/dist/ui/components/AssistantMessage.d.ts +2 -1
  50. package/dist/ui/components/AssistantMessage.d.ts.map +1 -1
  51. package/dist/ui/components/AssistantMessage.js +3 -2
  52. package/dist/ui/components/AssistantMessage.js.map +1 -1
  53. package/dist/ui/components/Banner.d.ts.map +1 -1
  54. package/dist/ui/components/Banner.js +27 -6
  55. package/dist/ui/components/Banner.js.map +1 -1
  56. package/dist/ui/components/CompactionNotice.d.ts +10 -0
  57. package/dist/ui/components/CompactionNotice.d.ts.map +1 -0
  58. package/dist/ui/components/CompactionNotice.js +31 -0
  59. package/dist/ui/components/CompactionNotice.js.map +1 -0
  60. package/dist/ui/components/Footer.d.ts +2 -1
  61. package/dist/ui/components/Footer.d.ts.map +1 -1
  62. package/dist/ui/components/Footer.js +9 -5
  63. package/dist/ui/components/Footer.js.map +1 -1
  64. package/dist/ui/components/InputArea.d.ts +7 -2
  65. package/dist/ui/components/InputArea.d.ts.map +1 -1
  66. package/dist/ui/components/InputArea.js +120 -8
  67. package/dist/ui/components/InputArea.js.map +1 -1
  68. package/dist/ui/components/SlashCommandMenu.d.ts +15 -0
  69. package/dist/ui/components/SlashCommandMenu.d.ts.map +1 -0
  70. package/dist/ui/components/SlashCommandMenu.js +32 -0
  71. package/dist/ui/components/SlashCommandMenu.js.map +1 -0
  72. package/dist/ui/components/StreamingArea.d.ts +2 -1
  73. package/dist/ui/components/StreamingArea.d.ts.map +1 -1
  74. package/dist/ui/components/StreamingArea.js +15 -3
  75. package/dist/ui/components/StreamingArea.js.map +1 -1
  76. package/dist/ui/components/SubAgentPanel.d.ts.map +1 -1
  77. package/dist/ui/components/SubAgentPanel.js +54 -16
  78. package/dist/ui/components/SubAgentPanel.js.map +1 -1
  79. package/dist/ui/components/ThinkingBlock.d.ts +11 -0
  80. package/dist/ui/components/ThinkingBlock.d.ts.map +1 -0
  81. package/dist/ui/components/ThinkingBlock.js +40 -0
  82. package/dist/ui/components/ThinkingBlock.js.map +1 -0
  83. package/dist/ui/components/ToolExecution.d.ts.map +1 -1
  84. package/dist/ui/components/ToolExecution.js +22 -5
  85. package/dist/ui/components/ToolExecution.js.map +1 -1
  86. package/dist/ui/components/UserMessage.d.ts +2 -1
  87. package/dist/ui/components/UserMessage.d.ts.map +1 -1
  88. package/dist/ui/components/UserMessage.js +4 -2
  89. package/dist/ui/components/UserMessage.js.map +1 -1
  90. package/dist/ui/hooks/useAgentLoop.d.ts +6 -3
  91. package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
  92. package/dist/ui/hooks/useAgentLoop.js +1 -1
  93. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  94. package/dist/ui/render.d.ts.map +1 -1
  95. package/dist/ui/render.js +22 -2
  96. package/dist/ui/render.js.map +1 -1
  97. package/dist/ui/theme/dark.json +2 -1
  98. package/dist/ui/theme/light.json +2 -1
  99. package/dist/ui/theme/theme.d.ts +1 -0
  100. package/dist/ui/theme/theme.d.ts.map +1 -1
  101. package/dist/utils/image.d.ts +24 -0
  102. package/dist/utils/image.d.ts.map +1 -0
  103. package/dist/utils/image.js +137 -0
  104. package/dist/utils/image.js.map +1 -0
  105. package/package.json +3 -3
@@ -0,0 +1,475 @@
1
+ /**
2
+ * Prompt-template commands — slash commands that inject detailed prompts
3
+ * into the agent loop. Each command maps to a full prompt the agent executes.
4
+ */
5
+ export const PROMPT_COMMANDS = [
6
+ {
7
+ name: "scan",
8
+ aliases: [],
9
+ description: "Find dead code, bugs, and security issues",
10
+ prompt: `Find quick wins in this codebase. Spawn 5 sub-agents in parallel using the subagent tool (call the subagent tool 5 times in a single response, each with a different task), each focusing on one area. Adapt each area to what's relevant for THIS project's stack and architecture.
11
+
12
+ **Agent 1 - Performance**: Inefficient algorithms, unnecessary work, missing early returns, blocking operations, things that scale poorly
13
+
14
+ **Agent 2 - Dead Weight**: Unused code, unreachable paths, stale comments/TODOs, obsolete files, imports to nowhere
15
+
16
+ **Agent 3 - Lurking Bugs**: Unhandled edge cases, missing error handling, resource leaks, race conditions, silent failures
17
+
18
+ **Agent 4 - Security**: Hardcoded secrets, injection risks, exposed sensitive data, overly permissive access, unsafe defaults
19
+
20
+ **Agent 5 - Dependencies & Config**: Unused packages, vulnerable dependencies, misconfigured settings, dead environment variables, orphaned config files
21
+
22
+ ## The Only Valid Findings
23
+
24
+ A finding is ONLY valid if it falls into one of these categories:
25
+
26
+ 1. **Dead** - Code that literally does nothing. Unused, unreachable, no-op.
27
+ 2. **Broken** - Will cause errors, crashes, or wrong behavior. Not "might" - WILL.
28
+ 3. **Dangerous** - Security holes, data exposure, resource exhaustion.
29
+
30
+ That's it. Three categories. If it doesn't fit, don't report it.
31
+
32
+ **NOT valid findings:**
33
+ - "This works but could be cleaner" - NO
34
+ - "Modern best practice suggests..." - NO
35
+ - "This is verbose/repetitive but functional" - NO
36
+ - "You could use X instead of Y" - NO
37
+ - "This isn't how I'd write it" - NO
38
+
39
+ If the code works, isn't dangerous, and does something - leave it alone.
40
+
41
+ ## Output Format
42
+
43
+ For each finding:
44
+ \`\`\`
45
+ [DEAD/BROKEN/DANGEROUS] file:line - What it is
46
+ Impact: What happens if left unfixed
47
+ \`\`\`
48
+
49
+ Finding nothing is a valid outcome. Most codebases don't have easy wins - that's fine.`,
50
+ },
51
+ {
52
+ name: "verify",
53
+ aliases: [],
54
+ description: "Verify code against docs and best practices",
55
+ prompt: `Verify this codebase against current best practices and official documentation. Spawn 8 sub-agents in parallel using the subagent tool (call the subagent tool 8 times in a single response, each with a different task), each focusing on one category. Each agent must VERIFY findings using real code samples or official docs - no assumptions allowed.
56
+
57
+ **Agent 1 - Core Framework**: Detect the main framework, verify usage patterns against official documentation
58
+
59
+ **Agent 2 - Dependencies/Libraries**: Check if library APIs being used are current or deprecated. Verify against library documentation
60
+
61
+ **Agent 3 - Language Patterns**: Identify the primary language, verify idioms and patterns are current
62
+
63
+ **Agent 4 - Configuration**: Examine build tools, bundlers, linters, and config files. Verify settings against current tool documentation
64
+
65
+ **Agent 5 - Security Patterns**: Review auth, data handling, secrets management. Verify against current security guidance and OWASP recommendations
66
+
67
+ **Agent 6 - Testing**: Identify test framework in use, verify testing patterns match current library recommendations
68
+
69
+ **Agent 7 - API/Data Handling**: Review data fetching, state management, storage patterns. Verify against current patterns and framework docs
70
+
71
+ **Agent 8 - Error Handling**: Examine error handling patterns, verify they match library documentation
72
+
73
+ ## Agent Workflow
74
+
75
+ Each agent MUST follow this process:
76
+ 1. **Identify** - What's relevant in THIS project for your category
77
+ 2. **Find** - Locate specific implementations in the codebase
78
+ 3. **Verify** - Check against real code or official docs
79
+ 4. **Report** - Only report when verified current practice differs from codebase
80
+
81
+ ## The Only Valid Findings
82
+
83
+ A finding is ONLY valid if:
84
+ 1. **OUTDATED** - Works but uses old patterns with verified better alternatives
85
+ 2. **DEPRECATED** - Uses APIs marked deprecated in current official docs
86
+ 3. **INCORRECT** - Implementation contradicts official documentation
87
+
88
+ **NOT valid findings:**
89
+ - "I think there's a better way" without verification - NO
90
+ - "This looks old" without proof - NO
91
+ - Style preferences or subjective improvements - NO
92
+ - Anything not verified via real code or official docs - NO
93
+
94
+ ## Output Format
95
+
96
+ For each finding:
97
+ \`\`\`
98
+ [OUTDATED/DEPRECATED/INCORRECT] file:line - What it is
99
+ Current: How it's implemented now
100
+ Verified: What the correct/current approach is
101
+ Source: URL to official docs or evidence
102
+ \`\`\`
103
+
104
+ No findings is a valid outcome. If implementations match current practices, that's good news.`,
105
+ },
106
+ {
107
+ name: "research",
108
+ aliases: [],
109
+ description: "Research best tools, deps, and patterns",
110
+ prompt: `Research the best tools, dependencies, and architecture for this project.
111
+
112
+ First, if it's not clear what the project is building, ask me to describe the features, target platform, and any constraints. If you can infer this from the codebase, proceed directly.
113
+
114
+ Then spawn 6 sub-agents in parallel using the subagent tool (call the subagent tool 6 times in a single response, each with a different task). Every agent must verify ALL recommendations - no training-data assumptions allowed.
115
+
116
+ **Agent 1 - Project Scan**: Read the current working directory. Catalog what already exists: config files, installed deps, directory structure, language/framework already chosen. Report exactly what's in place.
117
+
118
+ **Agent 2 - Stack Validation**: Research whether the current framework/language is the best choice for this project. Compare top 2-3 alternatives on performance, ecosystem, and developer experience. Pick ONE winner with evidence.
119
+
120
+ **Agent 3 - Core Dependencies**: For EACH feature, find the single best library for this stack. Confirm latest stable versions. No outdated packages. Output: package name, version, one-line purpose.
121
+
122
+ **Agent 4 - Dev Tooling**: Research the best dev tooling for this stack: package manager, bundler, linter, formatter, test framework, type checker. Pick ONE per category with exact versions.
123
+
124
+ **Agent 5 - Architecture**: Find how real projects of this type structure their code. Look for directory layouts, file naming conventions, and key patterns. Output a concrete directory tree and list of patterns.
125
+
126
+ **Agent 6 - Config & Integration**: Research required config files for the chosen stack and tools. Cover: linter config, formatter config, TS/type config, env setup, CI/CD basics.
127
+
128
+ ## Agent Rules
129
+
130
+ 1. Every recommendation MUST be verified - no guessing
131
+ 2. Confirm latest stable versions - do not assume version numbers
132
+ 3. Pick ONE best option per category - no "you could also use X"
133
+ 4. No prose, no hedging, no alternatives lists - decisive answers only
134
+
135
+ ## Output
136
+
137
+ After all agents complete, synthesize findings into a single RESEARCH.md file:
138
+
139
+ \`\`\`markdown
140
+ # RESEARCH: [short project description]
141
+ Generated: [today's date]
142
+ Stack: [framework + language + runtime]
143
+
144
+ ## INSTALL
145
+ [exact shell commands - copy-paste ready]
146
+
147
+ ## DEPENDENCIES
148
+ | package | version | purpose |
149
+ [each purpose max 5 words]
150
+
151
+ ## DEV DEPENDENCIES
152
+ | package | version | purpose |
153
+
154
+ ## CONFIG FILES TO CREATE
155
+ ### [filename]
156
+ [exact file contents or key settings]
157
+
158
+ ## PROJECT STRUCTURE
159
+ [tree showing recommended directories]
160
+
161
+ ## SETUP STEPS
162
+ 1. [concrete action]
163
+
164
+ ## KEY PATTERNS
165
+ [brief list of architectural patterns]
166
+
167
+ ## SOURCES
168
+ [URLs used for verification]
169
+ \`\`\`
170
+
171
+ Write the file, then summarize what was researched.`,
172
+ },
173
+ {
174
+ name: "init",
175
+ aliases: [],
176
+ description: "Generate or update CLAUDE.md for this project",
177
+ prompt: `Generate or update a minimal CLAUDE.md with project structure, guidelines, and quality checks.
178
+
179
+ ## Step 1: Check if CLAUDE.md Exists
180
+
181
+ If CLAUDE.md exists:
182
+ - Read the existing file
183
+ - Preserve custom sections the user may have added
184
+ - Update the structure, quality checks, and organization rules
185
+
186
+ If CLAUDE.md does NOT exist:
187
+ - Create a new one from scratch
188
+
189
+ ## Step 2: Analyze Project (Use Sub-agents in Parallel)
190
+
191
+ Spawn 3 sub-agents in parallel using the subagent tool (call the subagent tool 3 times in a single response):
192
+
193
+ 1. **Project Purpose Agent**: Analyze README, package.json description, main files to understand what the project does
194
+ 2. **Directory Structure Agent**: Map out the folder structure and what each folder contains
195
+ 3. **Tech Stack Agent**: Identify languages, frameworks, tools, dependencies
196
+
197
+ Wait for all sub-agents to complete, then synthesize the information.
198
+
199
+ ## Step 3: Detect Project Type & Commands
200
+
201
+ Check for config files:
202
+ - package.json -> JavaScript/TypeScript (extract lint, typecheck, server scripts)
203
+ - pyproject.toml or requirements.txt -> Python
204
+ - go.mod -> Go
205
+ - Cargo.toml -> Rust
206
+
207
+ Extract linting commands, typechecking commands, and server start command (if applicable).
208
+
209
+ ## Step 4: Generate Project Tree
210
+
211
+ Create a concise tree structure showing key directories and files with brief descriptions.
212
+
213
+ ## Step 5: Generate or Update CLAUDE.md
214
+
215
+ Create CLAUDE.md with: project description, project structure tree, organization rules (one file per component, single responsibility), and zero-tolerance code quality checks with the exact commands for this project.
216
+
217
+ Keep total file under 100 lines. If updating, preserve any custom sections the user added.`,
218
+ },
219
+ {
220
+ name: "setup-lint",
221
+ aliases: [],
222
+ description: "Generate a /fix command for linting and typechecking",
223
+ prompt: `Detect the project type and generate a /fix command for linting and typechecking.
224
+
225
+ ## Step 1: Detect Project Type
226
+
227
+ Check for config files:
228
+ - package.json -> JavaScript/TypeScript
229
+ - pyproject.toml or requirements.txt -> Python
230
+ - go.mod -> Go
231
+ - Cargo.toml -> Rust
232
+ - composer.json -> PHP
233
+
234
+ Read the relevant config file to understand the project structure.
235
+
236
+ ## Step 2: Check Existing Tools
237
+
238
+ Based on the project type, check if linting/typechecking tools are already configured:
239
+
240
+ - **JS/TS**: eslint, prettier, typescript — check package.json scripts and config files
241
+ - **Python**: mypy, pylint, black, ruff — check dependencies and config files
242
+ - **Go**: go vet, gofmt, staticcheck
243
+ - **Rust**: clippy, rustfmt
244
+
245
+ ## Step 3: Install Missing Tools (if needed)
246
+
247
+ Only install what's missing. Use the detected package manager.
248
+
249
+ ## Step 4: Generate /fix Command
250
+
251
+ Create the directory \`.gg/commands/\` if it doesn't exist, then write \`.gg/commands/fix.md\`:
252
+
253
+ \`\`\`markdown
254
+ ---
255
+ name: fix
256
+ description: Run typechecking and linting, then spawn parallel agents to fix all issues
257
+ ---
258
+
259
+ Run all linting and typechecking tools, collect errors, group them by domain, and use the subagent tool to spawn parallel sub-agents to fix them.
260
+
261
+ ## Step 1: Run Checks
262
+
263
+ [INSERT PROJECT-SPECIFIC COMMANDS — e.g. npm run lint, npm run typecheck, etc.]
264
+
265
+ ## Step 2: Collect and Group Errors
266
+
267
+ Parse the output. Group errors by domain:
268
+ - **Type errors**: Issues from TypeScript, mypy, etc.
269
+ - **Lint errors**: Issues from eslint, pylint, ruff, clippy, etc.
270
+ - **Format errors**: Issues from prettier, black, rustfmt, gofmt
271
+
272
+ ## Step 3: Spawn Parallel Agents
273
+
274
+ For each domain with issues, use the subagent tool to spawn a sub-agent to fix all errors in that domain.
275
+
276
+ ## Step 4: Verify
277
+
278
+ After all agents complete, re-run all checks to verify all issues are resolved.
279
+ \`\`\`
280
+
281
+ Replace [INSERT PROJECT-SPECIFIC COMMANDS] with the actual commands for the detected project.
282
+
283
+ ## Step 5: Confirm
284
+
285
+ Report what was detected, what was installed, and that /fix is now available.`,
286
+ },
287
+ {
288
+ name: "setup-commit",
289
+ aliases: [],
290
+ description: "Generate a /commit command with quality checks",
291
+ prompt: `Detect the project type and generate a /commit command that enforces quality checks before committing.
292
+
293
+ ## Step 1: Detect Project and Extract Commands
294
+
295
+ Check for config files and extract the lint/typecheck commands:
296
+ - package.json -> Extract lint, typecheck scripts
297
+ - pyproject.toml -> Use mypy, pylint/ruff
298
+ - go.mod -> Use go vet, gofmt
299
+ - Cargo.toml -> Use cargo clippy, cargo fmt --check
300
+
301
+ ## Step 2: Generate /commit Command
302
+
303
+ Create the directory \`.gg/commands/\` if it doesn't exist, then write \`.gg/commands/commit.md\`:
304
+
305
+ \`\`\`markdown
306
+ ---
307
+ name: commit
308
+ description: Run checks, commit with AI message, and push
309
+ ---
310
+
311
+ 1. Run quality checks:
312
+ [PROJECT-SPECIFIC LINT/TYPECHECK COMMANDS]
313
+ Fix ALL errors before continuing. Use auto-fix commands where available.
314
+
315
+ 2. Review changes: run git status and git diff --staged and git diff
316
+
317
+ 3. Stage relevant files with git add (specific files, not -A)
318
+
319
+ 4. Generate a commit message:
320
+ - Start with verb (Add/Update/Fix/Remove/Refactor)
321
+ - Be specific and concise, one line preferred
322
+
323
+ 5. Commit and push:
324
+ git commit -m "your generated message"
325
+ git push
326
+ \`\`\`
327
+
328
+ Replace [PROJECT-SPECIFIC LINT/TYPECHECK COMMANDS] with the actual commands.
329
+
330
+ Keep the command file under 20 lines.
331
+
332
+ ## Step 3: Confirm
333
+
334
+ Report that /commit is now available with quality checks and AI-generated commit messages.`,
335
+ },
336
+ {
337
+ name: "setup-tests",
338
+ aliases: [],
339
+ description: "Set up testing and generate a /test command",
340
+ prompt: `Set up comprehensive testing for this project and generate a /test command.
341
+
342
+ ## Step 1: Analyze Project
343
+
344
+ Detect the project type, framework, and architecture. Identify all critical business logic that needs testing.
345
+
346
+ ## Step 2: Determine Testing Strategy
347
+
348
+ Use these tools based on project type (2025-2026 best practices):
349
+
350
+ | Language | Unit/Integration | E2E | Notes |
351
+ |----------|------------------|-----|-------|
352
+ | JS/TS | Vitest (not Jest) | Playwright | Vitest is faster, native ESM/TS. Use Testing Library for components. |
353
+ | Python | pytest | Playwright | pytest-django for Django, httpx+pytest-asyncio for FastAPI. |
354
+ | Go | testing + testify | httptest | testcontainers-go for integration. Table-driven tests. |
355
+ | Rust | #[test] + rstest | axum-test | assert_cmd for CLI, proptest for property-based. |
356
+ | PHP | Pest 4 (Laravel) / PHPUnit 12 | Laravel Dusk | Pest preferred for Laravel. |
357
+
358
+ ## Step 3: Set Up Testing Infrastructure
359
+
360
+ Spawn 4 sub-agents in parallel using the subagent tool (call the subagent tool 4 times in a single response):
361
+
362
+ **Agent 1 - Dependencies & Config**: Install test frameworks and create config files
363
+ **Agent 2 - Unit Tests**: Create comprehensive unit tests for all business logic, utilities, and core functions
364
+ **Agent 3 - Integration Tests**: Create integration tests for APIs, database operations, and service interactions
365
+ **Agent 4 - E2E Tests** (if applicable): Create end-to-end tests for critical user flows
366
+
367
+ Each agent should create COMPREHENSIVE tests covering all critical code paths - not just samples.
368
+
369
+ ## Step 4: Verify and Generate /test Command
370
+
371
+ Run the tests to verify everything works. Fix any issues.
372
+
373
+ Then create the directory \`.gg/commands/\` if it doesn't exist and write \`.gg/commands/test.md\` with:
374
+
375
+ \`\`\`markdown
376
+ ---
377
+ name: test
378
+ description: Run tests, then spawn parallel agents to fix failures
379
+ ---
380
+
381
+ Run all tests for this project, collect failures, and use the subagent tool to spawn parallel sub-agents to fix them.
382
+
383
+ ## Step 1: Run Tests
384
+
385
+ [PROJECT-SPECIFIC TEST COMMANDS with options for watch mode, coverage, filtering]
386
+
387
+ ## Step 2: If Failures
388
+
389
+ For each failing test, use the subagent tool to spawn a sub-agent to fix the underlying issue (not the test).
390
+
391
+ ## Step 3: Re-run
392
+
393
+ Re-run tests to verify all fixes.
394
+ \`\`\`
395
+
396
+ Replace placeholders with the actual test commands for this project.
397
+
398
+ ## Step 5: Report
399
+
400
+ Summarize what was set up, how many tests were created, and that /test is now available.`,
401
+ },
402
+ {
403
+ name: "setup-update",
404
+ aliases: [],
405
+ description: "Generate an /update command for dependency updates",
406
+ prompt: `Detect the project type and generate an /update command for dependency updates and deprecation fixes.
407
+
408
+ ## Step 1: Detect Project Type & Package Manager
409
+
410
+ Check for config files and lock files:
411
+ - package.json + package-lock.json -> npm
412
+ - package.json + yarn.lock -> yarn
413
+ - package.json + pnpm-lock.yaml -> pnpm
414
+ - pyproject.toml + poetry.lock -> poetry
415
+ - requirements.txt -> pip
416
+ - go.mod -> Go
417
+ - Cargo.toml -> Rust
418
+
419
+ ## Step 2: Generate /update Command
420
+
421
+ Create the directory \`.gg/commands/\` if it doesn't exist, then write \`.gg/commands/update.md\`:
422
+
423
+ \`\`\`markdown
424
+ ---
425
+ name: update
426
+ description: Update dependencies, fix deprecations and warnings
427
+ ---
428
+
429
+ ## Step 1: Check for Updates
430
+
431
+ [OUTDATED CHECK COMMAND for detected package manager]
432
+
433
+ ## Step 2: Update Dependencies
434
+
435
+ [UPDATE COMMAND + SECURITY AUDIT]
436
+
437
+ ## Step 3: Check for Deprecations & Warnings
438
+
439
+ Run a clean install and read ALL output carefully. Look for:
440
+ - Deprecation warnings
441
+ - Security vulnerabilities
442
+ - Peer dependency warnings
443
+ - Breaking changes
444
+
445
+ ## Step 4: Fix Issues
446
+
447
+ For each warning/deprecation:
448
+ 1. Research the recommended replacement or fix
449
+ 2. Update code/dependencies accordingly
450
+ 3. Re-run installation
451
+ 4. Verify no warnings remain
452
+
453
+ ## Step 5: Run Quality Checks
454
+
455
+ [PROJECT-SPECIFIC LINT/TYPECHECK COMMANDS]
456
+
457
+ Fix all errors before completing.
458
+
459
+ ## Step 6: Verify Clean Install
460
+
461
+ Delete dependency folders/caches, run a fresh install, verify ZERO warnings/errors.
462
+ \`\`\`
463
+
464
+ Replace all placeholders with the actual commands for the detected project type and package manager.
465
+
466
+ ## Step 3: Confirm
467
+
468
+ Report that /update is now available with dependency updates, security audits, and deprecation fixes.`,
469
+ },
470
+ ];
471
+ /** Look up a prompt command by name or alias */
472
+ export function getPromptCommand(name) {
473
+ return PROMPT_COMMANDS.find((cmd) => cmd.name === name || cmd.aliases.includes(name));
474
+ }
475
+ //# sourceMappingURL=prompt-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-commands.js","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,2CAA2C;QACxD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAuC2E;KACpF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6CAA6C;QAC1D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAiDkF;KAC3F;IACD;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,yCAAyC;QACtD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDA6DwC;KACjD;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,+CAA+C;QAC5D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAwC+E;KACxF;IACD;QACE,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sDAAsD;QACnE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EA8DkE;KAC3E;IACD;QACE,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gDAAgD;QAC7D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FA2C+E;KACxF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6CAA6C;QAC1D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFA4D6E;KACtF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,oDAAoD;QACjE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sGA8D0F;KACnG;CACF,CAAC;AAEF,gDAAgD;AAChD,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACxF,CAAC"}
@@ -10,10 +10,12 @@ declare const SettingsSchema: z.ZodObject<{
10
10
  }>>;
11
11
  defaultModel: z.ZodOptional<z.ZodString>;
12
12
  maxTokens: z.ZodDefault<z.ZodNumber>;
13
+ thinkingEnabled: z.ZodDefault<z.ZodBoolean>;
13
14
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
14
15
  low: "low";
15
16
  medium: "medium";
16
17
  high: "high";
18
+ max: "max";
17
19
  }>>;
18
20
  theme: z.ZodDefault<z.ZodEnum<{
19
21
  dark: "dark";
@@ -1 +1 @@
1
- {"version":3,"file":"settings-manager.d.ts","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;iBAWlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,QAQ9B,CAAC;AAIF,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,QAAQ,CAAC,EAAE,MAAM;IAIvB,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC;IAazB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAI5C,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9E,MAAM,IAAI,QAAQ;CAGnB"}
1
+ {"version":3,"file":"settings-manager.d.ts","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;iBAYlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAIF,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,QAAQ,CAAC,EAAE,MAAM;IAIvB,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC;IAazB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAI5C,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9E,MAAM,IAAI,QAAQ;CAGnB"}
@@ -8,7 +8,8 @@ const SettingsSchema = z.object({
8
8
  defaultProvider: z.enum(["anthropic", "openai", "glm", "moonshot"]).default("anthropic"),
9
9
  defaultModel: z.string().optional(),
10
10
  maxTokens: z.number().int().min(256).default(16384),
11
- thinkingLevel: z.enum(["low", "medium", "high"]).optional(),
11
+ thinkingEnabled: z.boolean().default(false),
12
+ thinkingLevel: z.enum(["low", "medium", "high", "max"]).optional(),
12
13
  theme: z.enum(["dark", "light"]).default("dark"),
13
14
  showTokenUsage: z.boolean().default(true),
14
15
  showThinking: z.boolean().default(true),
@@ -19,6 +20,7 @@ export const DEFAULT_SETTINGS = {
19
20
  compactThreshold: 0.8,
20
21
  defaultProvider: "anthropic",
21
22
  maxTokens: 16384,
23
+ thinkingEnabled: false,
22
24
  theme: "dark",
23
25
  showTokenUsage: true,
24
26
  showThinking: true,
@@ -1 +1 @@
1
- {"version":3,"file":"settings-manager.js","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,8DAA8D;AAE9D,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC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C,QAAQ,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,GAAG,CAA2B,GAAM;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,GAAG,CAA2B,GAAM,EAAE,KAAkB;QAC5D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export { createTools, createReadTool, createWriteTool, createEditTool, createBashTool, createFindTool, createGrepTool, createLsTool, } from "./tools/index.js";
2
2
  export { buildSystemPrompt } from "./system-prompt.js";
3
3
  export { createSession, loadSession, listSessions, getMostRecentSession, persistMessage, } from "./session.js";
4
- export { runInteractive } from "./interactive.js";
5
4
  export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
6
5
  export { runPrintMode } from "./modes/index.js";
7
6
  export { renderApp } from "./ui/render.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAA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AAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5E,YAAY,EACV,SAAS,EACT,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,EACnB,YAAY,IAAI,kBAAkB,EAClC,WAAW,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -4,8 +4,6 @@ export { createTools, createReadTool, createWriteTool, createEditTool, createBas
4
4
  export { buildSystemPrompt } from "./system-prompt.js";
5
5
  // Session (legacy — still usable)
6
6
  export { createSession, loadSession, listSessions, getMostRecentSession, persistMessage, } from "./session.js";
7
- // Interactive (legacy readline REPL)
8
- export { runInteractive } from "./interactive.js";
9
7
  // Core
10
8
  export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
11
9
  // Modes
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kCAAkC;AAClC,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO;AACP,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,WAAW;AACX,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,SAAS;AACT,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kCAAkC;AAClC,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,WAAW;AACX,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,SAAS;AACT,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAIrE;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA2HtF"}
1
+ {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAIrE;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAgItF"}
@@ -98,11 +98,15 @@ export async function buildSystemPrompt(cwd, skills) {
98
98
  sections.push(skillsSection);
99
99
  }
100
100
  }
101
- // 9. Environment
102
- sections.push(`## Environment\n\n` +
103
- `- Current date: ${new Date().toISOString().split("T")[0]}\n` +
104
- `- Working directory: ${cwd}\n` +
105
- `- Platform: ${process.platform}`);
101
+ // 9. Environment (static — cacheable)
102
+ sections.push(`## Environment\n\n` + `- Working directory: ${cwd}\n` + `- Platform: ${process.platform}`);
103
+ // Dynamic section (uncached) — separated by marker so the transform layer
104
+ // can split the system prompt into cached + uncached blocks.
105
+ const today = new Date();
106
+ const day = today.getDate();
107
+ const month = today.toLocaleString("en-US", { month: "long" });
108
+ const year = today.getFullYear();
109
+ sections.push(`<!-- uncached -->\nToday's date: ${day} ${month} ${year}`);
106
110
  return sections.join("\n\n");
107
111
  }
108
112
  //# sourceMappingURL=system-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAc,MAAM,kBAAkB,CAAC;AAErE,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW,EAAE,MAAgB;IACnE,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,cAAc;IACd,QAAQ,CAAC,IAAI,CACX,2FAA2F;QACzF,iFAAiF;QACjF,oCAAoC,CACvC,CAAC;IAEF,iBAAiB;IACjB,QAAQ,CAAC,IAAI,CACX,oBAAoB;QAClB,6BAA6B;QAC7B,qDAAqD;QACrD,wFAAwF;QACxF,iGAAiG;QACjG,kEAAkE;QAClE,sBAAsB;QACtB,gGAAgG;QAChG,oEAAoE;QACpE,uEAAuE;QACvE,0DAA0D;QAC1D,4BAA4B;Q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,aAAa,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,aAAa,EAAE,CAAC;YAClB,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,sCAAsC;IACtC,QAAQ,CAAC,IAAI,CACX,oBAAoB,GAAG,wBAAwB,GAAG,IAAI,GAAG,eAAe,OAAO,CAAC,QAAQ,EAAE,CAC3F,CAAC;IAEF,0EAA0E;IAC1E,6DAA6D;IAC7D,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,oCAAoC,GAAG,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC;IAE1E,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
package/dist/ui/App.d.ts CHANGED
@@ -5,12 +5,14 @@ import type { ProcessManager } from "../core/process-manager.js";
5
5
  interface UserItem {
6
6
  kind: "user";
7
7
  text: string;
8
+ imageCount?: number;
8
9
  id: string;
9
10
  }
10
11
  interface AssistantItem {
11
12
  kind: "assistant";
12
13
  text: string;
13
14
  thinking?: string;
15
+ thinkingMs?: number;
14
16
  id: string;
15
17
  }
16
18
  interface ToolStartItem {
@@ -39,6 +41,18 @@ interface InfoItem {
39
41
  text: string;
40
42
  id: string;
41
43
  }
44
+ interface CompactingItem {
45
+ kind: "compacting";
46
+ id: string;
47
+ }
48
+ interface CompactedItem {
49
+ kind: "compacted";
50
+ originalCount: number;
51
+ newCount: number;
52
+ tokensBefore: number;
53
+ tokensAfter: number;
54
+ id: string;
55
+ }
42
56
  interface DurationItem {
43
57
  kind: "duration";
44
58
  durationMs: number;
@@ -71,7 +85,7 @@ interface ServerToolDoneItem {
71
85
  data: unknown;
72
86
  id: string;
73
87
  }
74
- export type CompletedItem = UserItem | AssistantItem | ToolStartItem | ToolDoneItem | ServerToolStartItem | ServerToolDoneItem | ErrorItem | InfoItem | DurationItem | BannerItem | SubAgentGroupItem;
88
+ export type CompletedItem = UserItem | AssistantItem | ToolStartItem | ToolDoneItem | ServerToolStartItem | ServerToolDoneItem | ErrorItem | InfoItem | CompactingItem | CompactedItem | DurationItem | BannerItem | SubAgentGroupItem;
75
89
  export interface AppProps {
76
90
  provider: Provider;
77
91
  model: string;