Skip to content

Commit ea399f1

Browse files
authored
Fix type (#1239)
* 完善所有用到的type对象,并添加中文注释 * 补充遗失的type
1 parent c499bfb commit ea399f1

68 files changed

Lines changed: 986 additions & 208 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
// Auto-generated stub — replace with real implementation
2-
export type Cursor = any
1+
/** 渲染帧中虚拟终端光标的状态(列/行坐标与是否绘制),供 diff 与光标 preamble 使用。 */
2+
export type Cursor = {
3+
x: number // 光标所在列,从 0 开始计
4+
y: number // 光标所在行,从 0 开始计
5+
visible: boolean // 本帧是否应在终端绘制光标(隐藏时不发射光标移动序列)
6+
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
// Auto-generated stub — replace with real implementation
2-
export type PasteEvent = any
1+
/** Box 等组件上 `onPaste` / `onPasteCapture` 收到的粘贴事件形状(与括号粘贴解析结果对齐的占位约定)。 */
2+
export type PasteEvent = {
3+
pastedText: string // 终端括号粘贴模式下解析出的 UTF-8 文本;允许为空字符串以表示空粘贴
4+
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
// Auto-generated stub — replace with real implementation
2-
export type ResizeEvent = any
1+
/** 终端尺寸变化时 `onResize` 回调收到的事件载荷(与 `stdout.columns` / `stdout.rows` 一致)。 */
2+
export type ResizeEvent = {
3+
columns: number // 当前终端列数(宽度)
4+
rows: number // 当前终端行数(高度)
5+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type BASH_TOOL_NAME = any
1+
/** Bash 工具在 API 与 Agent 提示串中的注册名称字面量(与 `@claude-code-best/builtin-tools` 中 `BASH_TOOL_NAME` 常量一致)。 */
2+
export type BASH_TOOL_NAME = 'Bash'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type EXIT_PLAN_MODE_TOOL_NAME = any
1+
/** ExitPlanMode 工具在 API 中的注册名称字面量(与内置 ExitPlanMode 工具 `name` 一致)。 */
2+
export type EXIT_PLAN_MODE_TOOL_NAME = 'ExitPlanMode'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type FILE_EDIT_TOOL_NAME = any
1+
/** Edit(文件编辑)工具在 API 中的注册名称字面量(与 `FILE_EDIT_TOOL_NAME` 常量 `'Edit'` 一致)。 */
2+
export type FILE_EDIT_TOOL_NAME = 'Edit'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type FILE_READ_TOOL_NAME = any
1+
/** Read(文件读取)工具在 API 中的注册名称字面量(与 `FILE_READ_TOOL_NAME` 常量 `'Read'` 一致)。 */
2+
export type FILE_READ_TOOL_NAME = 'Read'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type FILE_WRITE_TOOL_NAME = any
1+
/** Write(文件写入)工具在 API 中的注册名称字面量(与 `FILE_WRITE_TOOL_NAME` 常量 `'Write'` 一致)。 */
2+
export type FILE_WRITE_TOOL_NAME = 'Write'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type GLOB_TOOL_NAME = any
1+
/** Glob(文件名模式匹配)工具在 API 中的注册名称字面量(与 `GLOB_TOOL_NAME` 常量 `'Glob'` 一致)。 */
2+
export type GLOB_TOOL_NAME = 'Glob'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Auto-generated type stub — replace with real implementation
2-
export type GREP_TOOL_NAME = any
1+
/** Grep(内容搜索)工具在 API 中的注册名称字面量(与 `GREP_TOOL_NAME` 常量 `'Grep'` 一致)。 */
2+
export type GREP_TOOL_NAME = 'Grep'

0 commit comments

Comments
 (0)