@trim21/personal-pi-extensions 0.1.20261017201810 → 0.1.20261017205345
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/package.json +1 -1
- package/src/aft/outline.md +2 -2
- package/src/aft/tools.ts +2 -2
package/package.json
CHANGED
package/src/aft/outline.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
在读取具体内容之前先了解文件或目录的结构。
|
|
4
4
|
|
|
5
5
|
- target 为文件路径时:返回该文件的符号大纲,每个符号带签名与行号(如 `function greet(name: string): void 5:12`);Markdown/HTML 返回标题层级。适合先定位符号名和位置,再决定是否用 aft_zoom 看实现。
|
|
6
|
-
- target 为目录路径时:默认返回扁平文件树(语言、顶层符号数、字节大小),一眼看清目录里有什么、规模多大;传 `files: false`
|
|
6
|
+
- target 为目录路径时:默认返回扁平文件树(语言、顶层符号数、字节大小),一眼看清目录里有什么、规模多大;传 `files: false` 可切换为符号大纲(目录下每个文件的符号树,无签名)。
|
|
7
7
|
- `includeTests` 只在符号大纲模式(`files: false`)生效:为 true 时包含测试文件,默认排除。
|
|
8
|
-
-
|
|
8
|
+
- 目录遍历上限由引擎决定(当前 10000 个文件);超出部分在结果中标记截断。
|
|
9
9
|
- 只接受单个 target,不支持数组;跨文件批量用多次调用。
|
|
10
10
|
|
|
11
11
|
分工:看结构用本工具;看某个符号的完整源码用 aft_zoom;看符号间调用关系用 aft_callgraph。
|
package/src/aft/tools.ts
CHANGED
|
@@ -133,7 +133,7 @@ const OutlineParams = Type.Object(
|
|
|
133
133
|
{
|
|
134
134
|
target: Type.String({
|
|
135
135
|
description:
|
|
136
|
-
"要 outline 的对象:文件路径或目录路径。只接受单个 target
|
|
136
|
+
"要 outline 的对象:文件路径或目录路径。只接受单个 target;目录遍历上限由引擎决定(当前 10000 个文件)。",
|
|
137
137
|
}),
|
|
138
138
|
files: Type.Optional(
|
|
139
139
|
Type.Boolean({
|
|
@@ -159,7 +159,7 @@ export function registerOutlineTool(bus: ToolBus, ctx: AftToolContext): void {
|
|
|
159
159
|
"输出代码文件、目录的结构化大纲:函数/类/类型等符号及其行号范围;Markdown/HTML 返回标题层级。",
|
|
160
160
|
"用它在读取具体内容之前先了解文件结构。",
|
|
161
161
|
"深入了解某个符号用 aft_zoom;看跨文件调用关系用 aft_callgraph。",
|
|
162
|
-
"target
|
|
162
|
+
"target 支持:文件路径(带签名的符号大纲)、目录路径(遍历上限由引擎决定,当前 10000 文件)。只接受单个 target。",
|
|
163
163
|
"target 为目录时默认返回扁平文件树(语言、顶层符号数、字节大小);传 files: false 可改回符号大纲。",
|
|
164
164
|
].join("\n"),
|
|
165
165
|
promptSnippet: "Output structural outline of a file/directory",
|