@shareai-lab/kode 1.0.71 → 1.0.73
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.
- package/README.md +142 -1
- package/README.zh-CN.md +47 -1
- package/package.json +5 -1
- package/src/ProjectOnboarding.tsx +47 -29
- package/src/Tool.ts +33 -4
- package/src/commands/agents.tsx +3401 -0
- package/src/commands/help.tsx +2 -2
- package/src/commands/resume.tsx +2 -1
- package/src/commands/terminalSetup.ts +4 -4
- package/src/commands.ts +3 -0
- package/src/components/ApproveApiKey.tsx +1 -1
- package/src/components/Config.tsx +10 -6
- package/src/components/ConsoleOAuthFlow.tsx +5 -4
- package/src/components/CustomSelect/select-option.tsx +28 -2
- package/src/components/CustomSelect/select.tsx +14 -5
- package/src/components/CustomSelect/theme.ts +45 -0
- package/src/components/Help.tsx +4 -4
- package/src/components/InvalidConfigDialog.tsx +1 -1
- package/src/components/LogSelector.tsx +1 -1
- package/src/components/MCPServerApprovalDialog.tsx +1 -1
- package/src/components/Message.tsx +2 -0
- package/src/components/ModelListManager.tsx +10 -6
- package/src/components/ModelSelector.tsx +201 -23
- package/src/components/ModelStatusDisplay.tsx +7 -5
- package/src/components/PromptInput.tsx +117 -87
- package/src/components/SentryErrorBoundary.ts +3 -3
- package/src/components/StickerRequestForm.tsx +16 -0
- package/src/components/StructuredDiff.tsx +36 -29
- package/src/components/TextInput.tsx +13 -0
- package/src/components/TodoItem.tsx +11 -0
- package/src/components/TrustDialog.tsx +1 -1
- package/src/components/messages/AssistantLocalCommandOutputMessage.tsx +5 -1
- package/src/components/messages/AssistantToolUseMessage.tsx +14 -4
- package/src/components/messages/TaskProgressMessage.tsx +32 -0
- package/src/components/messages/TaskToolMessage.tsx +58 -0
- package/src/components/permissions/FallbackPermissionRequest.tsx +2 -4
- package/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.tsx +1 -1
- package/src/components/permissions/FileEditPermissionRequest/FileEditToolDiff.tsx +5 -3
- package/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.tsx +1 -1
- package/src/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.tsx +5 -3
- package/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.tsx +2 -4
- package/src/components/permissions/PermissionRequest.tsx +3 -5
- package/src/constants/macros.ts +2 -0
- package/src/constants/modelCapabilities.ts +179 -0
- package/src/constants/models.ts +90 -0
- package/src/constants/product.ts +1 -1
- package/src/context.ts +7 -7
- package/src/entrypoints/cli.tsx +23 -3
- package/src/entrypoints/mcp.ts +10 -10
- package/src/hooks/useCanUseTool.ts +1 -1
- package/src/hooks/useTextInput.ts +5 -2
- package/src/hooks/useUnifiedCompletion.ts +1404 -0
- package/src/messages.ts +1 -0
- package/src/query.ts +3 -0
- package/src/screens/ConfigureNpmPrefix.tsx +1 -1
- package/src/screens/Doctor.tsx +1 -1
- package/src/screens/REPL.tsx +15 -9
- package/src/services/adapters/base.ts +38 -0
- package/src/services/adapters/chatCompletions.ts +90 -0
- package/src/services/adapters/responsesAPI.ts +170 -0
- package/src/services/claude.ts +198 -62
- package/src/services/customCommands.ts +43 -22
- package/src/services/gpt5ConnectionTest.ts +340 -0
- package/src/services/mcpClient.ts +1 -1
- package/src/services/mentionProcessor.ts +273 -0
- package/src/services/modelAdapterFactory.ts +69 -0
- package/src/services/openai.ts +521 -12
- package/src/services/responseStateManager.ts +90 -0
- package/src/services/systemReminder.ts +113 -12
- package/src/test/testAdapters.ts +96 -0
- package/src/tools/AskExpertModelTool/AskExpertModelTool.tsx +120 -56
- package/src/tools/BashTool/BashTool.tsx +4 -31
- package/src/tools/BashTool/BashToolResultMessage.tsx +1 -1
- package/src/tools/BashTool/OutputLine.tsx +1 -0
- package/src/tools/FileEditTool/FileEditTool.tsx +4 -5
- package/src/tools/FileReadTool/FileReadTool.tsx +43 -10
- package/src/tools/MCPTool/MCPTool.tsx +2 -1
- package/src/tools/MultiEditTool/MultiEditTool.tsx +2 -2
- package/src/tools/NotebookReadTool/NotebookReadTool.tsx +15 -23
- package/src/tools/StickerRequestTool/StickerRequestTool.tsx +1 -1
- package/src/tools/TaskTool/TaskTool.tsx +170 -86
- package/src/tools/TaskTool/prompt.ts +61 -25
- package/src/tools/ThinkTool/ThinkTool.tsx +1 -3
- package/src/tools/TodoWriteTool/TodoWriteTool.tsx +11 -10
- package/src/tools/lsTool/lsTool.tsx +5 -2
- package/src/tools.ts +16 -16
- package/src/types/conversation.ts +51 -0
- package/src/types/logs.ts +58 -0
- package/src/types/modelCapabilities.ts +64 -0
- package/src/types/notebook.ts +87 -0
- package/src/utils/advancedFuzzyMatcher.ts +290 -0
- package/src/utils/agentLoader.ts +284 -0
- package/src/utils/ask.tsx +1 -0
- package/src/utils/commands.ts +1 -1
- package/src/utils/commonUnixCommands.ts +161 -0
- package/src/utils/config.ts +173 -2
- package/src/utils/conversationRecovery.ts +1 -0
- package/src/utils/debugLogger.ts +13 -13
- package/src/utils/exampleCommands.ts +1 -0
- package/src/utils/fuzzyMatcher.ts +328 -0
- package/src/utils/messages.tsx +6 -5
- package/src/utils/responseState.ts +23 -0
- package/src/utils/secureFile.ts +559 -0
- package/src/utils/terminal.ts +1 -0
- package/src/utils/theme.ts +11 -0
- package/src/hooks/useSlashCommandTypeahead.ts +0 -137
package/README.md
CHANGED
|
@@ -2,22 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@shareai-lab/kode)
|
|
4
4
|
[](https://opensource.org/licenses/ISC)
|
|
5
|
+
[](https://agents.md)
|
|
5
6
|
|
|
6
7
|
[中文文档](README.zh-CN.md) | [Contributing](CONTRIBUTING.md) | [Documentation](docs/)
|
|
7
8
|
|
|
9
|
+
## 🤝 AGENTS.md Standard Support
|
|
10
|
+
|
|
11
|
+
**Kode proudly supports the [AGENTS.md standard protocol](https://agents.md) initiated by OpenAI** - a simple, open format for guiding programming agents that's used by 20k+ open source projects.
|
|
12
|
+
|
|
13
|
+
### Full Compatibility with Multiple Standards
|
|
14
|
+
|
|
15
|
+
- ✅ **AGENTS.md** - Native support for the OpenAI-initiated standard format
|
|
16
|
+
- ✅ **CLAUDE.md** - Full backward compatibility with Claude Code configurations
|
|
17
|
+
- ✅ **Subagent System** - Advanced agent delegation and task orchestration
|
|
18
|
+
- ✅ **Cross-platform** - Works with 20+ AI models and providers
|
|
19
|
+
|
|
20
|
+
Use `# Your documentation request` to generate and maintain your AGENTS.md file automatically, while maintaining full compatibility with existing Claude Code workflows.
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
8
24
|
Kode is a powerful AI assistant that lives in your terminal. It can understand your codebase, edit files, run commands, and handle entire workflows for you.
|
|
9
25
|
|
|
10
26
|
## Features
|
|
11
27
|
|
|
28
|
+
### Core Capabilities
|
|
12
29
|
- 🤖 **AI-Powered Assistance** - Uses advanced AI models to understand and respond to your requests
|
|
13
30
|
- 🔄 **Multi-Model Collaboration** - Flexibly switch and combine multiple AI models to leverage their unique strengths
|
|
31
|
+
- 🦜 **Expert Model Consultation** - Use `@ask-model-name` to consult specific AI models for specialized analysis
|
|
32
|
+
- 👤 **Intelligent Agent System** - Use `@run-agent-name` to delegate tasks to specialized subagents
|
|
14
33
|
- 📝 **Code Editing** - Directly edit files with intelligent suggestions and improvements
|
|
15
34
|
- 🔍 **Codebase Understanding** - Analyzes your project structure and code relationships
|
|
16
35
|
- 🚀 **Command Execution** - Run shell commands and see results in real-time
|
|
17
36
|
- 🛠️ **Workflow Automation** - Handle complex development tasks with simple prompts
|
|
37
|
+
|
|
38
|
+
### 🎯 Advanced Intelligent Completion System
|
|
39
|
+
Our state-of-the-art completion system provides unparalleled coding assistance:
|
|
40
|
+
|
|
41
|
+
#### Smart Fuzzy Matching
|
|
42
|
+
- **Hyphen-Aware Matching** - Type `dao` to match `run-agent-dao-qi-harmony-designer`
|
|
43
|
+
- **Abbreviation Support** - `dq` matches `dao-qi`, `nde` matches `node`
|
|
44
|
+
- **Numeric Suffix Handling** - `py3` intelligently matches `python3`
|
|
45
|
+
- **Multi-Algorithm Fusion** - Combines 7+ matching algorithms for best results
|
|
46
|
+
|
|
47
|
+
#### Intelligent Context Detection
|
|
48
|
+
- **No @ Required** - Type `gp5` directly to match `@ask-gpt-5`
|
|
49
|
+
- **Auto-Prefix Addition** - Tab/Enter automatically adds `@` for agents and models
|
|
50
|
+
- **Mixed Completion** - Seamlessly switch between commands, files, agents, and models
|
|
51
|
+
- **Smart Prioritization** - Results ranked by relevance and usage frequency
|
|
52
|
+
|
|
53
|
+
#### Unix Command Optimization
|
|
54
|
+
- **500+ Common Commands** - Curated database of frequently used Unix/Linux commands
|
|
55
|
+
- **System Intersection** - Only shows commands that actually exist on your system
|
|
56
|
+
- **Priority Scoring** - Common commands appear first (git, npm, docker, etc.)
|
|
57
|
+
- **Real-time Loading** - Dynamic command discovery from system PATH
|
|
58
|
+
|
|
59
|
+
### User Experience
|
|
18
60
|
- 🎨 **Interactive UI** - Beautiful terminal interface with syntax highlighting
|
|
19
61
|
- 🔌 **Tool System** - Extensible architecture with specialized tools for different tasks
|
|
20
62
|
- 💾 **Context Management** - Smart context handling to maintain conversation continuity
|
|
63
|
+
- 📋 **AGENTS.md Integration** - Use `# documentation requests` to auto-generate and maintain project documentation
|
|
21
64
|
|
|
22
65
|
## Installation
|
|
23
66
|
|
|
@@ -50,6 +93,98 @@ kode -p "explain this function" main.js
|
|
|
50
93
|
kwa -p "explain this function" main.js
|
|
51
94
|
```
|
|
52
95
|
|
|
96
|
+
### Using the @ Mention System
|
|
97
|
+
|
|
98
|
+
Kode supports a powerful @ mention system for intelligent completions:
|
|
99
|
+
|
|
100
|
+
#### 🦜 Expert Model Consultation
|
|
101
|
+
```bash
|
|
102
|
+
# Consult specific AI models for expert opinions
|
|
103
|
+
@ask-claude-sonnet-4 How should I optimize this React component for performance?
|
|
104
|
+
@ask-gpt-5 What are the security implications of this authentication method?
|
|
105
|
+
@ask-o1-preview Analyze the complexity of this algorithm
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### 👤 Specialized Agent Delegation
|
|
109
|
+
```bash
|
|
110
|
+
# Delegate tasks to specialized subagents
|
|
111
|
+
@run-agent-simplicity-auditor Review this code for over-engineering
|
|
112
|
+
@run-agent-architect Design a microservices architecture for this system
|
|
113
|
+
@run-agent-test-writer Create comprehensive tests for these modules
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### 📁 Smart File References
|
|
117
|
+
```bash
|
|
118
|
+
# Reference files and directories with auto-completion
|
|
119
|
+
@src/components/Button.tsx
|
|
120
|
+
@docs/api-reference.md
|
|
121
|
+
@.env.example
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The @ mention system provides intelligent completions as you type, showing available models, agents, and files.
|
|
125
|
+
|
|
126
|
+
### AGENTS.md Documentation Mode
|
|
127
|
+
|
|
128
|
+
Use the `#` prefix to generate and maintain your AGENTS.md documentation:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Generate setup instructions
|
|
132
|
+
# How do I set up the development environment?
|
|
133
|
+
|
|
134
|
+
# Create testing documentation
|
|
135
|
+
# What are the testing procedures for this project?
|
|
136
|
+
|
|
137
|
+
# Document deployment process
|
|
138
|
+
# Explain the deployment pipeline and requirements
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
This mode automatically formats responses as structured documentation and appends them to your AGENTS.md file.
|
|
142
|
+
|
|
143
|
+
### Docker Usage
|
|
144
|
+
|
|
145
|
+
#### Alternative: Build from local source
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Clone the repository
|
|
149
|
+
git clone https://github.com/shareAI-lab/Kode.git
|
|
150
|
+
cd Kode
|
|
151
|
+
|
|
152
|
+
# Build the image locally
|
|
153
|
+
docker build --no-cache -t kode .
|
|
154
|
+
|
|
155
|
+
# Run in your project directory
|
|
156
|
+
cd your-project
|
|
157
|
+
docker run -it --rm \
|
|
158
|
+
-v $(pwd):/workspace \
|
|
159
|
+
-v ~/.kode:/root/.kode \
|
|
160
|
+
-v ~/.kode.json:/root/.kode.json \
|
|
161
|
+
-w /workspace \
|
|
162
|
+
kode
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### Docker Configuration Details
|
|
166
|
+
|
|
167
|
+
The Docker setup includes:
|
|
168
|
+
|
|
169
|
+
- **Volume Mounts**:
|
|
170
|
+
- `$(pwd):/workspace` - Mounts your current project directory
|
|
171
|
+
- `~/.kode:/root/.kode` - Preserves your kode configuration directory between runs
|
|
172
|
+
- `~/.kode.json:/root/.kode.json` - Preserves your kode global configuration file between runs
|
|
173
|
+
|
|
174
|
+
- **Working Directory**: Set to `/workspace` inside the container
|
|
175
|
+
|
|
176
|
+
- **Interactive Mode**: Uses `-it` flags for interactive terminal access
|
|
177
|
+
|
|
178
|
+
- **Cleanup**: `--rm` flag removes the container after exit
|
|
179
|
+
|
|
180
|
+
**Note**: Kode uses both `~/.kode` directory for additional data (like memory files) and `~/.kode.json` file for global configuration.
|
|
181
|
+
|
|
182
|
+
The first time you run the Docker command, it will build the image. Subsequent runs will use the cached image for faster startup.
|
|
183
|
+
|
|
184
|
+
You can use the onboarding to set up the model, or `/model`.
|
|
185
|
+
If you don't see the models you want on the list, you can manually set them in `/config`
|
|
186
|
+
As long as you have an openai-like endpoint, it should work.
|
|
187
|
+
|
|
53
188
|
### Commands
|
|
54
189
|
|
|
55
190
|
- `/help` - Show available commands
|
|
@@ -239,8 +374,14 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
|
|
|
239
374
|
|
|
240
375
|
ISC License - see [LICENSE](LICENSE) for details.
|
|
241
376
|
|
|
377
|
+
## Thanks
|
|
378
|
+
|
|
379
|
+
- Some code from @dnakov's anonkode
|
|
380
|
+
- Some UI learned from gemini-cli
|
|
381
|
+
- Some system design learned from claude code
|
|
382
|
+
|
|
242
383
|
## Support
|
|
243
384
|
|
|
244
385
|
- 📚 [Documentation](docs/)
|
|
245
386
|
- 🐛 [Report Issues](https://github.com/shareAI-lab/kode/issues)
|
|
246
|
-
- 💬 [Discussions](https://github.com/shareAI-lab/kode/discussions)
|
|
387
|
+
- 💬 [Discussions](https://github.com/shareAI-lab/kode/discussions)
|
package/README.zh-CN.md
CHANGED
|
@@ -50,6 +50,52 @@ kode -p "解释这个函数" main.js
|
|
|
50
50
|
kwa -p "解释这个函数" main.js
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
### Docker 使用说明
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 克隆仓库
|
|
57
|
+
git clone https://github.com/shareAI-lab/Kode.git
|
|
58
|
+
cd Kode
|
|
59
|
+
|
|
60
|
+
# 本地构建镜像
|
|
61
|
+
docker build --no-cache -t kode .
|
|
62
|
+
|
|
63
|
+
# 在你的项目目录中运行
|
|
64
|
+
cd your-project
|
|
65
|
+
docker run -it --rm \
|
|
66
|
+
-v $(pwd):/workspace \
|
|
67
|
+
-v ~/.kode:/root/.kode \
|
|
68
|
+
-v ~/.kode.json:/root/.kode.json \
|
|
69
|
+
-w /workspace \
|
|
70
|
+
kode
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Docker 配置详情
|
|
74
|
+
|
|
75
|
+
该 Docker 配置包含以下内容:
|
|
76
|
+
|
|
77
|
+
* **卷挂载(Volume Mounts)**:
|
|
78
|
+
|
|
79
|
+
* `$(pwd):/workspace` - 挂载当前项目目录
|
|
80
|
+
* `~/.kode:/root/.kode` - 在运行间保留 kode 配置目录
|
|
81
|
+
* `~/.kode.json:/root/.kode.json` - 在运行间保留 kode 全局配置文件
|
|
82
|
+
|
|
83
|
+
* **工作目录**:容器内工作目录设置为 `/workspace`
|
|
84
|
+
|
|
85
|
+
* **交互模式**:使用 `-it` 标志以交互式终端方式运行
|
|
86
|
+
|
|
87
|
+
* **清理**:使用 `--rm` 在退出后自动删除容器
|
|
88
|
+
|
|
89
|
+
**注意**:
|
|
90
|
+
Kode 同时使用 `~/.kode` 目录(存放额外数据,如内存文件)和 `~/.kode.json` 文件(全局配置)。
|
|
91
|
+
|
|
92
|
+
第一次运行 Docker 命令时会构建镜像,之后的运行会使用缓存镜像以加快启动速度。
|
|
93
|
+
|
|
94
|
+
你可以通过引导流程(onboarding)来设置模型,或使用 `/model` 命令。
|
|
95
|
+
如果在列表中没有你想要的模型,可以在 `/config` 中手动设置。
|
|
96
|
+
只要你有一个 OpenAI 风格的 API 端点,就可以正常使用。
|
|
97
|
+
|
|
98
|
+
|
|
53
99
|
### 常用命令
|
|
54
100
|
|
|
55
101
|
- `/help` - 显示可用命令
|
|
@@ -243,4 +289,4 @@ ISC 许可证 - 详见 [LICENSE](LICENSE)。
|
|
|
243
289
|
|
|
244
290
|
- 📚 [文档](docs/)
|
|
245
291
|
- 🐛 [报告问题](https://github.com/shareAI-lab/kode/issues)
|
|
246
|
-
- 💬 [讨论](https://github.com/shareAI-lab/kode/discussions)
|
|
292
|
+
- 💬 [讨论](https://github.com/shareAI-lab/kode/discussions)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shareai-lab/kode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
4
4
|
"bin": {
|
|
5
5
|
"kode": "cli.js",
|
|
6
6
|
"kwa": "cli.js",
|
|
@@ -66,9 +66,12 @@
|
|
|
66
66
|
"env-paths": "^3.0.0",
|
|
67
67
|
"figures": "^6.1.0",
|
|
68
68
|
"glob": "^11.0.3",
|
|
69
|
+
"gray-matter": "^4.0.3",
|
|
69
70
|
"highlight.js": "^11.11.1",
|
|
70
71
|
"ink": "^5.2.1",
|
|
71
72
|
"ink-link": "^4.1.0",
|
|
73
|
+
"ink-select-input": "^6.2.0",
|
|
74
|
+
"ink-text-input": "^6.0.0",
|
|
72
75
|
"lodash-es": "^4.17.21",
|
|
73
76
|
"lru-cache": "^11.1.0",
|
|
74
77
|
"marked": "^15.0.12",
|
|
@@ -86,6 +89,7 @@
|
|
|
86
89
|
},
|
|
87
90
|
"devDependencies": {
|
|
88
91
|
"@types/bun": "latest",
|
|
92
|
+
"@types/jest": "^30.0.0",
|
|
89
93
|
"@types/node": "^24.1.0",
|
|
90
94
|
"bun-types": "latest",
|
|
91
95
|
"prettier": "^3.6.2",
|
|
@@ -87,6 +87,7 @@ export default function ProjectOnboarding({
|
|
|
87
87
|
{showOnboarding && (
|
|
88
88
|
<>
|
|
89
89
|
<Text color={theme.secondaryText}>Tips for getting started:</Text>
|
|
90
|
+
{/* @ts-expect-error - OrderedList children prop issue */}
|
|
90
91
|
<OrderedList>
|
|
91
92
|
{/* Collect all the items that should be displayed */}
|
|
92
93
|
{(() => {
|
|
@@ -94,51 +95,66 @@ export default function ProjectOnboarding({
|
|
|
94
95
|
|
|
95
96
|
if (isWorkspaceDirEmpty) {
|
|
96
97
|
items.push(
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
<React.Fragment key="workspace">
|
|
99
|
+
{/* @ts-expect-error - OrderedList.Item children prop issue */}
|
|
100
|
+
<OrderedList.Item>
|
|
101
|
+
<Text color={theme.secondaryText}>
|
|
102
|
+
Ask {PRODUCT_NAME} to create a new app or clone a
|
|
103
|
+
repository.
|
|
104
|
+
</Text>
|
|
105
|
+
</OrderedList.Item>
|
|
106
|
+
</React.Fragment>,
|
|
103
107
|
)
|
|
104
108
|
}
|
|
105
109
|
if (needsClaudeMd) {
|
|
106
110
|
items.push(
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
<React.Fragment key="claudemd">
|
|
112
|
+
{/* @ts-expect-error - OrderedList.Item children prop issue */}
|
|
113
|
+
<OrderedList.Item>
|
|
114
|
+
<Text color={theme.secondaryText}>
|
|
115
|
+
Run <Text color={theme.text}>/init</Text> to create
|
|
110
116
|
a
|
|
111
117
|
{PROJECT_FILE} file with instructions for {PRODUCT_NAME}.
|
|
112
118
|
</Text>
|
|
113
|
-
|
|
119
|
+
</OrderedList.Item>
|
|
120
|
+
</React.Fragment>,
|
|
114
121
|
)
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
if (showTerminalTip) {
|
|
118
125
|
items.push(
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<Text
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
<React.Fragment key="terminal">
|
|
127
|
+
{/* @ts-expect-error - OrderedList.Item children prop issue */}
|
|
128
|
+
<OrderedList.Item>
|
|
129
|
+
<Text color={theme.secondaryText}>
|
|
130
|
+
Run <Text color={theme.text}>/terminal-setup</Text>
|
|
131
|
+
<Text bold={false}> to set up terminal integration</Text>
|
|
132
|
+
</Text>
|
|
133
|
+
</OrderedList.Item>
|
|
134
|
+
</React.Fragment>,
|
|
125
135
|
)
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
items.push(
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
139
|
+
<React.Fragment key="questions">
|
|
140
|
+
{/* @ts-expect-error - OrderedList.Item children prop issue */}
|
|
141
|
+
<OrderedList.Item>
|
|
142
|
+
<Text color={theme.secondaryText}>
|
|
143
|
+
Ask {PRODUCT_NAME} questions about your codebase.
|
|
144
|
+
</Text>
|
|
145
|
+
</OrderedList.Item>
|
|
146
|
+
</React.Fragment>,
|
|
134
147
|
)
|
|
135
148
|
|
|
136
149
|
items.push(
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
150
|
+
<React.Fragment key="changes">
|
|
151
|
+
{/* @ts-expect-error - OrderedList.Item children prop issue */}
|
|
152
|
+
<OrderedList.Item>
|
|
153
|
+
<Text color={theme.secondaryText}>
|
|
154
|
+
Ask {PRODUCT_NAME} to implement changes to your codebase.
|
|
155
|
+
</Text>
|
|
156
|
+
</OrderedList.Item>
|
|
157
|
+
</React.Fragment>,
|
|
142
158
|
)
|
|
143
159
|
|
|
144
160
|
return items
|
|
@@ -159,9 +175,11 @@ export default function ProjectOnboarding({
|
|
|
159
175
|
</Box>
|
|
160
176
|
<Box flexDirection="column" marginLeft={1}>
|
|
161
177
|
{releaseNotesToShow.map((note, noteIndex) => (
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
178
|
+
<React.Fragment key={noteIndex}>
|
|
179
|
+
<Text color={getTheme().secondaryText}>
|
|
180
|
+
• {note}
|
|
181
|
+
</Text>
|
|
182
|
+
</React.Fragment>
|
|
165
183
|
))}
|
|
166
184
|
</Box>
|
|
167
185
|
</Box>
|
package/src/Tool.ts
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
|
-
import { UUID } from 'crypto'
|
|
3
2
|
import * as React from 'react'
|
|
4
3
|
|
|
4
|
+
// DEPRECATED: Use domain/tool/Tool.interface.ts for new implementations
|
|
5
|
+
// This interface will be maintained for compatibility during transition
|
|
6
|
+
|
|
7
|
+
export type SetToolJSXFn = (jsx: {
|
|
8
|
+
jsx: React.ReactNode | null
|
|
9
|
+
shouldHidePromptInput: boolean
|
|
10
|
+
} | null) => void
|
|
11
|
+
|
|
5
12
|
export interface ToolUseContext {
|
|
6
|
-
messageId:
|
|
13
|
+
messageId: string | undefined
|
|
7
14
|
agentId?: string
|
|
8
15
|
safeMode?: boolean
|
|
16
|
+
abortController: AbortController
|
|
17
|
+
readFileTimestamps: { [filePath: string]: number }
|
|
18
|
+
options?: {
|
|
19
|
+
commands?: any[]
|
|
20
|
+
tools?: any[]
|
|
21
|
+
verbose?: boolean
|
|
22
|
+
slowAndCapableModel?: string
|
|
23
|
+
safeMode?: boolean
|
|
24
|
+
forkNumber?: number
|
|
25
|
+
messageLogName?: string
|
|
26
|
+
maxThinkingTokens?: any
|
|
27
|
+
isKodingRequest?: boolean
|
|
28
|
+
kodingContext?: string
|
|
29
|
+
isCustomCommand?: boolean
|
|
30
|
+
}
|
|
31
|
+
// GPT-5 Responses API state management
|
|
32
|
+
responseState?: {
|
|
33
|
+
previousResponseId?: string
|
|
34
|
+
conversationId?: string
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ExtendedToolUseContext extends ToolUseContext {
|
|
39
|
+
setToolJSX: SetToolJSXFn
|
|
9
40
|
}
|
|
10
41
|
|
|
11
42
|
export interface ValidationResult {
|
|
@@ -49,5 +80,3 @@ export interface Tool<
|
|
|
49
80
|
unknown
|
|
50
81
|
>
|
|
51
82
|
}
|
|
52
|
-
|
|
53
|
-
export type { ToolUseContext, ValidationResult }
|