@dungle-scrubs/tallow 0.9.4 → 0.9.6
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/dist/cli.js +7 -4
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/interactive-mode-patch.d.ts +24 -12
- package/dist/interactive-mode-patch.d.ts.map +1 -1
- package/dist/interactive-mode-patch.js +229 -146
- package/dist/interactive-mode-patch.js.map +1 -1
- package/dist/interactive-reset.d.ts +49 -0
- package/dist/interactive-reset.d.ts.map +1 -0
- package/dist/interactive-reset.js +40 -0
- package/dist/interactive-reset.js.map +1 -0
- package/dist/pi-tui-editor-patch.d.ts +10 -0
- package/dist/pi-tui-editor-patch.d.ts.map +1 -0
- package/dist/pi-tui-editor-patch.js +159 -0
- package/dist/pi-tui-editor-patch.js.map +1 -0
- package/dist/pi-tui-patch.d.ts +2 -0
- package/dist/pi-tui-patch.d.ts.map +1 -0
- package/dist/pi-tui-patch.js +563 -0
- package/dist/pi-tui-patch.js.map +1 -0
- package/dist/pi-tui-settings-list-patch.d.ts +11 -0
- package/dist/pi-tui-settings-list-patch.d.ts.map +1 -0
- package/dist/pi-tui-settings-list-patch.js +38 -0
- package/dist/pi-tui-settings-list-patch.js.map +1 -0
- package/dist/reset-diagnostics.d.ts +69 -0
- package/dist/reset-diagnostics.d.ts.map +1 -0
- package/dist/reset-diagnostics.js +41 -0
- package/dist/reset-diagnostics.js.map +1 -0
- package/dist/sdk.d.ts +5 -21
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +180 -149
- package/dist/sdk.js.map +1 -1
- package/dist/workspace-transition-interactive.d.ts +1 -0
- package/dist/workspace-transition-interactive.d.ts.map +1 -1
- package/dist/workspace-transition-interactive.js +7 -17
- package/dist/workspace-transition-interactive.js.map +1 -1
- package/extensions/__integration__/audit-findings.test.ts +4 -5
- package/extensions/_icons/index.ts +2 -4
- package/extensions/_shared/__tests__/image-metadata.test.ts +33 -0
- package/extensions/_shared/__tests__/terminal-links.test.ts +18 -0
- package/extensions/_shared/image-metadata.ts +99 -0
- package/extensions/_shared/inline-preview.ts +1 -1
- package/extensions/_shared/terminal-links.ts +22 -0
- package/extensions/ask-user-question-tool/index.ts +0 -3
- package/extensions/clear/__tests__/clear.test.ts +269 -2
- package/extensions/command-expansion/index.ts +1 -1
- package/extensions/context-files/index.ts +5 -1
- package/extensions/context-fork/__tests__/context-fork.test.ts +94 -1
- package/extensions/context-fork/extension.json +1 -1
- package/extensions/context-fork/index.ts +32 -0
- package/extensions/edit-tool-enhanced/index.ts +2 -1
- package/extensions/hooks/index.ts +33 -11
- package/extensions/loop/index.ts +14 -1
- package/extensions/lsp/index.ts +64 -13
- package/extensions/lsp/package.json +2 -2
- package/extensions/random-spinner/index.ts +7 -642
- package/extensions/read-tool-enhanced/index.ts +6 -8
- package/extensions/render-stabilizer/__tests__/render-stabilizer.test.ts +2 -3
- package/extensions/render-stabilizer/index.ts +6 -6
- package/extensions/slash-command-bridge/__tests__/slash-command-bridge.test.ts +26 -0
- package/extensions/slash-command-bridge/index.ts +14 -2
- package/extensions/subagent-tool/model-resolver.ts +274 -7
- package/extensions/tasks/commands/register-tasks-extension.ts +9 -9
- package/extensions/teams-tool/tools/register-extension.ts +1 -3
- package/extensions/web-search-tool/index.ts +2 -1
- package/extensions/write-tool-enhanced/index.ts +2 -1
- package/node_modules/@mariozechner/pi-tui/README.md +56 -34
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.d.ts +18 -13
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.js +182 -113
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/cancellable-loader.js +3 -3
- package/node_modules/@mariozechner/pi-tui/dist/components/cancellable-loader.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.d.ts +45 -36
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.js +489 -325
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/image.d.ts +1 -99
- package/node_modules/@mariozechner/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/image.js +17 -192
- package/node_modules/@mariozechner/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/input.js +57 -60
- package/node_modules/@mariozechner/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.d.ts +2 -69
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.js +5 -102
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/markdown.js +111 -53
- package/node_modules/@mariozechner/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.d.ts +19 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.js +78 -67
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.d.ts +1 -25
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.js +13 -50
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/index.d.ts +8 -10
- package/node_modules/@mariozechner/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/index.js +6 -9
- package/node_modules/@mariozechner/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts +108 -238
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.js +108 -365
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts +33 -48
- package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keys.js +239 -155
- package/node_modules/@mariozechner/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.d.ts +14 -94
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.js +44 -186
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts +13 -58
- package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal.js +78 -111
- package/node_modules/@mariozechner/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts +24 -110
- package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/tui.js +188 -435
- package/node_modules/@mariozechner/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/utils.d.ts +0 -18
- package/node_modules/@mariozechner/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/utils.js +251 -119
- package/node_modules/@mariozechner/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/package.json +6 -6
- package/node_modules/@mariozechner/pi-tui/src/__tests__/__snapshots__/render.test.ts.snap +3 -40
- package/node_modules/@mariozechner/pi-tui/src/__tests__/image-component.test.ts +71 -81
- package/node_modules/@mariozechner/pi-tui/src/__tests__/render.test.ts +0 -33
- package/node_modules/@mariozechner/pi-tui/src/__tests__/terminal-image.test.ts +93 -334
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-render-scheduling.test.ts +1 -1
- package/node_modules/@mariozechner/pi-tui/src/__tests__/utils.test.ts +11 -196
- package/node_modules/@mariozechner/pi-tui/src/autocomplete.ts +228 -142
- package/node_modules/@mariozechner/pi-tui/src/components/cancellable-loader.ts +3 -3
- package/node_modules/@mariozechner/pi-tui/src/components/editor.ts +624 -390
- package/node_modules/@mariozechner/pi-tui/src/components/image.ts +17 -227
- package/node_modules/@mariozechner/pi-tui/src/components/input.ts +71 -63
- package/node_modules/@mariozechner/pi-tui/src/components/loader.ts +5 -137
- package/node_modules/@mariozechner/pi-tui/src/components/markdown.ts +143 -52
- package/node_modules/@mariozechner/pi-tui/src/components/select-list.ts +136 -70
- package/node_modules/@mariozechner/pi-tui/src/components/settings-list.ts +12 -51
- package/node_modules/@mariozechner/pi-tui/src/index.ts +17 -36
- package/node_modules/@mariozechner/pi-tui/src/keybindings.ts +148 -421
- package/node_modules/@mariozechner/pi-tui/src/keys.ts +253 -181
- package/node_modules/@mariozechner/pi-tui/src/terminal-image.ts +51 -252
- package/node_modules/@mariozechner/pi-tui/src/terminal.ts +78 -133
- package/node_modules/@mariozechner/pi-tui/src/tui.ts +202 -478
- package/node_modules/@mariozechner/pi-tui/src/utils.ts +289 -125
- package/node_modules/@mariozechner/pi-tui/tsconfig.build.json +1 -0
- package/package.json +13 -13
- package/packages/tallow-tui/node_modules/@types/mime-types/README.md +8 -2
- package/packages/tallow-tui/node_modules/@types/mime-types/index.d.ts +6 -0
- package/packages/tallow-tui/node_modules/@types/mime-types/package.json +9 -3
- package/packages/tallow-tui/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/lookup.js +116 -384
- package/packages/tallow-tui/node_modules/get-east-asian-width/package.json +5 -4
- package/packages/tallow-tui/node_modules/get-east-asian-width/utilities.js +24 -0
- package/packages/tallow-tui/node_modules/marked/README.md +5 -4
- package/packages/tallow-tui/node_modules/marked/bin/main.js +10 -8
- package/packages/tallow-tui/node_modules/marked/bin/marked.js +2 -1
- package/packages/tallow-tui/node_modules/marked/lib/marked.d.ts +156 -125
- package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js +67 -2179
- package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js +67 -2201
- package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/packages/tallow-tui/node_modules/marked/man/marked.1 +4 -2
- package/packages/tallow-tui/node_modules/marked/man/marked.1.md +2 -1
- package/packages/tallow-tui/node_modules/marked/package.json +26 -34
- package/skills/tallow-expert/SKILL.md +1 -3
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.d.ts +0 -32
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.d.ts.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.js +0 -46
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.js.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.d.ts +0 -52
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.d.ts.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.js +0 -89
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.js.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.d.ts +0 -14
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.d.ts.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.js +0 -55
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.js.map +0 -1
- package/node_modules/@mariozechner/pi-tui/src/__tests__/editor-change-listener.test.ts +0 -121
- package/node_modules/@mariozechner/pi-tui/src/__tests__/editor-ghost-text.test.ts +0 -112
- package/node_modules/@mariozechner/pi-tui/src/__tests__/mouse-events.test.ts +0 -134
- package/node_modules/@mariozechner/pi-tui/src/__tests__/settings-list.test.ts +0 -81
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-diff-regression.test.ts +0 -555
- package/node_modules/@mariozechner/pi-tui/src/border-styles.ts +0 -60
- package/node_modules/@mariozechner/pi-tui/src/components/bordered-box.ts +0 -113
- package/node_modules/@mariozechner/pi-tui/src/test-utils/capability-env.ts +0 -56
- package/packages/tallow-tui/node_modules/marked/lib/marked.cjs +0 -2211
- package/packages/tallow-tui/node_modules/marked/lib/marked.cjs.map +0 -7
- package/packages/tallow-tui/node_modules/marked/lib/marked.d.cts +0 -728
- package/packages/tallow-tui/node_modules/marked/marked.min.js +0 -69
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.TH "MARKED" "1" "
|
|
1
|
+
.TH "MARKED" "1" "April 2026" "17.0.6"
|
|
2
2
|
.SH "NAME"
|
|
3
3
|
\fBmarked\fR \- a javascript markdown parser
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -104,7 +104,9 @@ marked\.parse('*foo*');
|
|
|
104
104
|
Please report any bugs to https://github.com/markedjs/marked
|
|
105
105
|
.SH LICENSE
|
|
106
106
|
.P
|
|
107
|
-
Copyright (c)
|
|
107
|
+
Copyright (c) 2018+, MarkedJS\. (MIT License)
|
|
108
|
+
.br
|
|
109
|
+
Copyright (c) 2011\-2018, Christopher Jeffrey\. (MIT License)
|
|
108
110
|
.SH SEE ALSO
|
|
109
111
|
.P
|
|
110
112
|
markdown(1), nodejs(1)
|
|
@@ -85,7 +85,8 @@ Please report any bugs to <https://github.com/markedjs/marked>.
|
|
|
85
85
|
|
|
86
86
|
## LICENSE
|
|
87
87
|
|
|
88
|
-
Copyright (c)
|
|
88
|
+
Copyright (c) 2018+, MarkedJS. (MIT License)
|
|
89
|
+
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
89
90
|
|
|
90
91
|
## SEE ALSO
|
|
91
92
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "marked",
|
|
3
3
|
"description": "A markdown parser built for speed",
|
|
4
4
|
"author": "Christopher Jeffrey",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "18.0.0",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "./lib/marked.
|
|
7
|
+
"main": "./lib/marked.esm.js",
|
|
8
8
|
"module": "./lib/marked.esm.js",
|
|
9
9
|
"browser": "./lib/marked.umd.js",
|
|
10
10
|
"types": "./lib/marked.d.ts",
|
|
@@ -15,22 +15,14 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"bin/",
|
|
17
17
|
"lib/",
|
|
18
|
-
"man/"
|
|
19
|
-
"marked.min.js"
|
|
18
|
+
"man/"
|
|
20
19
|
],
|
|
21
20
|
"exports": {
|
|
22
21
|
".": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"default": "./lib/marked.esm.js"
|
|
26
|
-
},
|
|
27
|
-
"default": {
|
|
28
|
-
"types": "./lib/marked.d.cts",
|
|
29
|
-
"default": "./lib/marked.cjs"
|
|
30
|
-
}
|
|
22
|
+
"types": "./lib/marked.d.ts",
|
|
23
|
+
"default": "./lib/marked.esm.js"
|
|
31
24
|
},
|
|
32
25
|
"./bin/marked": "./bin/marked.js",
|
|
33
|
-
"./marked.min.js": "./marked.min.js",
|
|
34
26
|
"./package.json": "./package.json"
|
|
35
27
|
},
|
|
36
28
|
"publishConfig": {
|
|
@@ -56,30 +48,31 @@
|
|
|
56
48
|
"html"
|
|
57
49
|
],
|
|
58
50
|
"devDependencies": {
|
|
59
|
-
"@arethetypeswrong/cli": "^0.18.
|
|
60
|
-
"@markedjs/eslint-config": "^1.0.
|
|
61
|
-
"@markedjs/testutils": "
|
|
51
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
52
|
+
"@markedjs/eslint-config": "^1.0.14",
|
|
53
|
+
"@markedjs/testutils": "17.0.1-2",
|
|
62
54
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
63
55
|
"@semantic-release/git": "^10.0.1",
|
|
64
|
-
"@semantic-release/github": "^
|
|
65
|
-
"@semantic-release/npm": "^
|
|
66
|
-
"@semantic-release/release-notes-generator": "^14.0
|
|
67
|
-
"cheerio": "1.
|
|
56
|
+
"@semantic-release/github": "^12.0.6",
|
|
57
|
+
"@semantic-release/npm": "^13.1.5",
|
|
58
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
59
|
+
"cheerio": "1.2.0",
|
|
68
60
|
"commonmark": "0.31.2",
|
|
69
|
-
"cross-env": "^
|
|
61
|
+
"cross-env": "^10.1.0",
|
|
70
62
|
"dts-bundle-generator": "^9.5.1",
|
|
71
|
-
"esbuild": "^0.
|
|
63
|
+
"esbuild": "^0.28.0",
|
|
72
64
|
"esbuild-plugin-umd-wrapper": "^3.0.0",
|
|
73
|
-
"eslint": "^
|
|
65
|
+
"eslint": "^10.2.0",
|
|
74
66
|
"highlight.js": "^11.11.1",
|
|
75
|
-
"markdown-it": "14.1.
|
|
76
|
-
"marked-highlight": "^2.2.
|
|
67
|
+
"markdown-it": "14.1.1",
|
|
68
|
+
"marked-highlight": "^2.2.3",
|
|
77
69
|
"marked-man": "^2.1.0",
|
|
78
70
|
"recheck": "^4.5.0",
|
|
79
|
-
"
|
|
71
|
+
"rimraf": "^6.1.3",
|
|
72
|
+
"semantic-release": "^25.0.3",
|
|
80
73
|
"titleize": "^4.0.0",
|
|
81
74
|
"tslib": "^2.8.1",
|
|
82
|
-
"typescript": "
|
|
75
|
+
"typescript": "6.0.2"
|
|
83
76
|
},
|
|
84
77
|
"scripts": {
|
|
85
78
|
"bench": "npm run build && node test/bench.js",
|
|
@@ -87,25 +80,24 @@
|
|
|
87
80
|
"build:docs": "npm run build && node docs/build.js",
|
|
88
81
|
"build:esbuild": "node esbuild.config.js",
|
|
89
82
|
"build:man": "marked-man man/marked.1.md > man/marked.1",
|
|
90
|
-
"build:reset": "
|
|
91
|
-
"build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts
|
|
83
|
+
"build:reset": "rimraf ./lib ./public",
|
|
84
|
+
"build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts",
|
|
92
85
|
"lint": "eslint --fix",
|
|
93
86
|
"rules": "node test/rules.js",
|
|
94
|
-
"test": "npm run build && npm run test:specs && npm run test:unit",
|
|
95
|
-
"test:all": "npm test && npm run test:umd && npm run test:cjs && npm run test:types && npm run test:lint",
|
|
87
|
+
"test": "npm run build:reset && npm run build:docs && npm run test:specs && npm run test:unit && npm run test:umd && npm run test:cjs && npm run test:types && npm run test:lint",
|
|
96
88
|
"test:cjs": "node test/cjs-test.cjs",
|
|
97
89
|
"test:lint": "eslint",
|
|
98
90
|
"test:only": "npm run build && npm run test:specs:only && npm run test:unit:only",
|
|
99
|
-
"test:redos": "node test/recheck.
|
|
91
|
+
"test:redos": "node test/recheck.ts > vuln.js",
|
|
100
92
|
"test:specs:only": "node --test --test-only --test-reporter=spec test/run-spec-tests.js",
|
|
101
93
|
"test:specs": "node --test --test-reporter=spec test/run-spec-tests.js",
|
|
102
|
-
"test:types": "tsc --project tsconfig-type-test.json && attw -P --
|
|
94
|
+
"test:types": "tsc --project tsconfig-type-test.json && attw -P --entrypoints . --profile esm-only",
|
|
103
95
|
"test:umd": "node test/umd-test.js",
|
|
104
96
|
"test:unit:only": "node --test --test-only --test-reporter=spec test/unit/*.test.js",
|
|
105
97
|
"test:unit": "node --test --test-reporter=spec test/unit/*.test.js",
|
|
106
98
|
"test:update": "node test/update-specs.js"
|
|
107
99
|
},
|
|
108
100
|
"engines": {
|
|
109
|
-
"node": ">=
|
|
101
|
+
"node": ">= 20"
|
|
110
102
|
}
|
|
111
103
|
}
|
|
@@ -33,7 +33,7 @@ Relay that answer to the user.
|
|
|
33
33
|
|
|
34
34
|
| Component | Location |
|
|
35
35
|
|-----------|----------|
|
|
36
|
-
| Core source | `src/` (agent-runner.ts, atomic-write.ts, auth-hardening.ts, cli-auto-rebuild.ts, cli.ts, compaction-cancel-patch.ts, config.ts, extensions-global.d.ts, fatal-errors.ts, index.ts, install.ts, interactive-mode-patch.ts, model-metadata-overrides.ts, otel.ts, pid-manager.ts, pid-schema.ts, plugins.ts, process-cleanup.ts, project-trust-banner.ts, project-trust-interop.ts, project-trust.ts, runtime-path-provider.ts, runtime-provenance.ts, sdk.ts, session-migration.ts, session-utils.ts, startup-profile.ts, startup-timing.ts, streaming-yield-patch.ts, workspace-transition-interactive.ts, workspace-transition-relay.ts, workspace-transition.ts, yield-to-io.ts) |
|
|
36
|
+
| Core source | `src/` (agent-runner.ts, atomic-write.ts, auth-hardening.ts, cli-auto-rebuild.ts, cli.ts, compaction-cancel-patch.ts, config.ts, extensions-global.d.ts, fatal-errors.ts, index.ts, install.ts, interactive-mode-patch.ts, interactive-reset.ts, model-metadata-overrides.ts, otel.ts, pi-tui-editor-patch.ts, pi-tui-patch.ts, pi-tui-settings-list-patch.ts, pid-manager.ts, pid-schema.ts, plugins.ts, process-cleanup.ts, project-trust-banner.ts, project-trust-interop.ts, project-trust.ts, reset-diagnostics.ts, runtime-path-provider.ts, runtime-provenance.ts, sdk.ts, session-migration.ts, session-utils.ts, startup-profile.ts, startup-timing.ts, streaming-yield-patch.ts, workspace-transition-interactive.ts, workspace-transition-relay.ts, workspace-transition.ts, yield-to-io.ts) |
|
|
37
37
|
| Extensions | `extensions/` — extension.json + index.ts each (53 bundled) |
|
|
38
38
|
| Skills | `skills/` — subdirs with SKILL.md |
|
|
39
39
|
| Agents | `agents/` — markdown with YAML frontmatter |
|
|
@@ -99,9 +99,7 @@ Extensions export a default function receiving `ExtensionAPI` (conventionally na
|
|
|
99
99
|
| `resources_discover` | `ResourcesDiscoverEvent` | `ResourcesDiscoverResult` |
|
|
100
100
|
| `session_start` | `SessionStartEvent` | — |
|
|
101
101
|
| `session_before_switch` | `SessionBeforeSwitchEvent` | `SessionBeforeSwitchResult` |
|
|
102
|
-
| `session_switch` | `SessionSwitchEvent` | — |
|
|
103
102
|
| `session_before_fork` | `SessionBeforeForkEvent` | `SessionBeforeForkResult` |
|
|
104
|
-
| `session_fork` | `SessionForkEvent` | — |
|
|
105
103
|
| `session_before_compact` | `SessionBeforeCompactEvent` | `SessionBeforeCompactResult` |
|
|
106
104
|
| `session_compact` | `SessionCompactEvent` | — |
|
|
107
105
|
| `session_shutdown` | `SessionShutdownEvent` | — |
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Border character sets for box-drawing.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
/** A set of box-drawing characters for rendering borders. */
|
|
7
|
-
export interface BorderStyle {
|
|
8
|
-
topLeft: string;
|
|
9
|
-
topRight: string;
|
|
10
|
-
bottomLeft: string;
|
|
11
|
-
bottomRight: string;
|
|
12
|
-
horizontal: string;
|
|
13
|
-
vertical: string;
|
|
14
|
-
}
|
|
15
|
-
/** Sharp corners — standard box-drawing (┌┐└┘). */
|
|
16
|
-
export declare const SHARP: BorderStyle;
|
|
17
|
-
/** Rounded corners — Unicode arc box-drawing (╭╮╰╯). */
|
|
18
|
-
export declare const ROUNDED: BorderStyle;
|
|
19
|
-
/** Flat — horizontal rules only, no corners or verticals. */
|
|
20
|
-
export declare const FLAT: BorderStyle;
|
|
21
|
-
/**
|
|
22
|
-
* Global default border style — set once, applies to all new BorderedBox instances.
|
|
23
|
-
* Extensions can set this at session_start to override.
|
|
24
|
-
*/
|
|
25
|
-
export declare let defaultBorderStyle: BorderStyle;
|
|
26
|
-
/**
|
|
27
|
-
* Set the global default border style.
|
|
28
|
-
*
|
|
29
|
-
* @param style - Border style to use as default
|
|
30
|
-
*/
|
|
31
|
-
export declare function setDefaultBorderStyle(style: BorderStyle): void;
|
|
32
|
-
//# sourceMappingURL=border-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border-styles.d.ts","sourceRoot":"","sources":["../src/border-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,mDAAmD;AACnD,eAAO,MAAM,KAAK,EAAE,WAOnB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,OAAO,EAAE,WAOrB,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,IAAI,EAAE,WAOlB,CAAC;AAEF;;;GAGG;AACH,eAAO,IAAI,kBAAkB,EAAE,WAAmB,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAE9D"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Border character sets for box-drawing.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
/** Sharp corners — standard box-drawing (┌┐└┘). */
|
|
7
|
-
export const SHARP = {
|
|
8
|
-
topLeft: "┌",
|
|
9
|
-
topRight: "┐",
|
|
10
|
-
bottomLeft: "└",
|
|
11
|
-
bottomRight: "┘",
|
|
12
|
-
horizontal: "─",
|
|
13
|
-
vertical: "│",
|
|
14
|
-
};
|
|
15
|
-
/** Rounded corners — Unicode arc box-drawing (╭╮╰╯). */
|
|
16
|
-
export const ROUNDED = {
|
|
17
|
-
topLeft: "╭",
|
|
18
|
-
topRight: "╮",
|
|
19
|
-
bottomLeft: "╰",
|
|
20
|
-
bottomRight: "╯",
|
|
21
|
-
horizontal: "─",
|
|
22
|
-
vertical: "│",
|
|
23
|
-
};
|
|
24
|
-
/** Flat — horizontal rules only, no corners or verticals. */
|
|
25
|
-
export const FLAT = {
|
|
26
|
-
topLeft: "─",
|
|
27
|
-
topRight: "─",
|
|
28
|
-
bottomLeft: "─",
|
|
29
|
-
bottomRight: "─",
|
|
30
|
-
horizontal: "─",
|
|
31
|
-
vertical: " ",
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Global default border style — set once, applies to all new BorderedBox instances.
|
|
35
|
-
* Extensions can set this at session_start to override.
|
|
36
|
-
*/
|
|
37
|
-
export let defaultBorderStyle = SHARP;
|
|
38
|
-
/**
|
|
39
|
-
* Set the global default border style.
|
|
40
|
-
*
|
|
41
|
-
* @param style - Border style to use as default
|
|
42
|
-
*/
|
|
43
|
-
export function setDefaultBorderStyle(style) {
|
|
44
|
-
defaultBorderStyle = style;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=border-styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border-styles.js","sourceRoot":"","sources":["../src/border-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,mDAAmD;AACnD,MAAM,CAAC,MAAM,KAAK,GAAgB;IACjC,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;CACb,CAAC;AAEF,wDAAwD;AACxD,MAAM,CAAC,MAAM,OAAO,GAAgB;IACnC,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;CACb,CAAC;AAEF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,IAAI,GAAgB;IAChC,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,IAAI,kBAAkB,GAAgB,KAAK,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAkB;IACvD,kBAAkB,GAAG,KAAK,CAAC;AAC5B,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Box component with configurable border style (sharp, rounded, flat).
|
|
3
|
-
*
|
|
4
|
-
* Wraps child content lines in a full border with optional title,
|
|
5
|
-
* padding, and background fill.
|
|
6
|
-
*
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
import { type BorderStyle } from "../border-styles.js";
|
|
10
|
-
import { Text } from "./text.js";
|
|
11
|
-
/** Configuration for a BorderedBox. */
|
|
12
|
-
export interface BorderedBoxOptions {
|
|
13
|
-
/** Border character set (defaults to global defaultBorderStyle). */
|
|
14
|
-
borderStyle?: BorderStyle;
|
|
15
|
-
/** Title rendered in the top border (optional). */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** Horizontal padding inside the border (default: 1). */
|
|
18
|
-
paddingX?: number;
|
|
19
|
-
/** Color function applied to border characters. */
|
|
20
|
-
borderColorFn?: (str: string) => string;
|
|
21
|
-
/** Color function applied to the title. */
|
|
22
|
-
titleColorFn?: (str: string) => string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Renders content inside a bordered box.
|
|
26
|
-
*
|
|
27
|
-
* Usage:
|
|
28
|
-
* ```typescript
|
|
29
|
-
* const box = new BorderedBox(["line 1", "line 2"], {
|
|
30
|
-
* borderStyle: ROUNDED,
|
|
31
|
-
* title: "Output",
|
|
32
|
-
* });
|
|
33
|
-
* const lines = box.render(80);
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export declare class BorderedBox extends Text {
|
|
37
|
-
private contentLines;
|
|
38
|
-
private options;
|
|
39
|
-
/**
|
|
40
|
-
* @param contentLines - Pre-rendered content lines to wrap
|
|
41
|
-
* @param options - Border style, title, padding, color functions
|
|
42
|
-
*/
|
|
43
|
-
constructor(contentLines: string[], options?: BorderedBoxOptions);
|
|
44
|
-
/**
|
|
45
|
-
* Render the bordered box to an array of terminal lines.
|
|
46
|
-
*
|
|
47
|
-
* @param width - Available terminal width
|
|
48
|
-
* @returns Array of rendered lines including top/bottom borders
|
|
49
|
-
*/
|
|
50
|
-
render(width: number): string[];
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=bordered-box.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bordered-box.d.ts","sourceRoot":"","sources":["../../src/components/bordered-box.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAsB,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IAClC,oEAAoE;IACpE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,WAAY,SAAQ,IAAI;IACpC,OAAO,CAAC,YAAY,CAAW;IAC/B,OAAO,CAAC,OAAO,CAAqB;IAEpC;;;OAGG;gBACS,YAAY,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,kBAAuB;IAMpE;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAqD/B"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Box component with configurable border style (sharp, rounded, flat).
|
|
3
|
-
*
|
|
4
|
-
* Wraps child content lines in a full border with optional title,
|
|
5
|
-
* padding, and background fill.
|
|
6
|
-
*
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
import { defaultBorderStyle } from "../border-styles.js";
|
|
10
|
-
import { truncateToWidth, visibleWidth } from "../utils.js";
|
|
11
|
-
import { Text } from "./text.js";
|
|
12
|
-
/**
|
|
13
|
-
* Renders content inside a bordered box.
|
|
14
|
-
*
|
|
15
|
-
* Usage:
|
|
16
|
-
* ```typescript
|
|
17
|
-
* const box = new BorderedBox(["line 1", "line 2"], {
|
|
18
|
-
* borderStyle: ROUNDED,
|
|
19
|
-
* title: "Output",
|
|
20
|
-
* });
|
|
21
|
-
* const lines = box.render(80);
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export class BorderedBox extends Text {
|
|
25
|
-
contentLines;
|
|
26
|
-
options;
|
|
27
|
-
/**
|
|
28
|
-
* @param contentLines - Pre-rendered content lines to wrap
|
|
29
|
-
* @param options - Border style, title, padding, color functions
|
|
30
|
-
*/
|
|
31
|
-
constructor(contentLines, options = {}) {
|
|
32
|
-
super("", contentLines.length + 2, 0);
|
|
33
|
-
this.contentLines = contentLines;
|
|
34
|
-
this.options = options;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Render the bordered box to an array of terminal lines.
|
|
38
|
-
*
|
|
39
|
-
* @param width - Available terminal width
|
|
40
|
-
* @returns Array of rendered lines including top/bottom borders
|
|
41
|
-
*/
|
|
42
|
-
render(width) {
|
|
43
|
-
const style = this.options.borderStyle ?? defaultBorderStyle;
|
|
44
|
-
const padX = this.options.paddingX ?? 1;
|
|
45
|
-
const colorBorder = this.options.borderColorFn ?? ((s) => s);
|
|
46
|
-
const colorTitle = this.options.titleColorFn ?? ((s) => s);
|
|
47
|
-
const innerWidth = width - 2 - padX * 2; // borders + padding
|
|
48
|
-
if (innerWidth < 1)
|
|
49
|
-
return this.contentLines;
|
|
50
|
-
const pad = " ".repeat(padX);
|
|
51
|
-
// Top border with optional title
|
|
52
|
-
let topBar;
|
|
53
|
-
if (this.options.title) {
|
|
54
|
-
const titleStr = ` ${colorTitle(this.options.title)} `;
|
|
55
|
-
const titleVisLen = visibleWidth(titleStr);
|
|
56
|
-
// topLeft(1) + leftBar(1) + titleStr + rightBar(rightFill) + topRight(1)
|
|
57
|
-
const rightFill = Math.max(0, width - 3 - titleVisLen);
|
|
58
|
-
topBar =
|
|
59
|
-
colorBorder(style.topLeft) +
|
|
60
|
-
colorBorder(style.horizontal) +
|
|
61
|
-
titleStr +
|
|
62
|
-
colorBorder(style.horizontal.repeat(rightFill)) +
|
|
63
|
-
colorBorder(style.topRight);
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
topBar =
|
|
67
|
-
colorBorder(style.topLeft) +
|
|
68
|
-
colorBorder(style.horizontal.repeat(width - 2)) +
|
|
69
|
-
colorBorder(style.topRight);
|
|
70
|
-
}
|
|
71
|
-
// Content lines with side borders
|
|
72
|
-
const bodyLines = this.contentLines.map((line) => {
|
|
73
|
-
const clamped = visibleWidth(line) > innerWidth ? truncateToWidth(line, innerWidth) : line;
|
|
74
|
-
const fill = Math.max(0, innerWidth - visibleWidth(clamped));
|
|
75
|
-
return (colorBorder(style.vertical) +
|
|
76
|
-
pad +
|
|
77
|
-
clamped +
|
|
78
|
-
" ".repeat(fill) +
|
|
79
|
-
pad +
|
|
80
|
-
colorBorder(style.vertical));
|
|
81
|
-
});
|
|
82
|
-
// Bottom border
|
|
83
|
-
const bottomBar = colorBorder(style.bottomLeft) +
|
|
84
|
-
colorBorder(style.horizontal.repeat(width - 2)) +
|
|
85
|
-
colorBorder(style.bottomRight);
|
|
86
|
-
return [topBar, ...bodyLines, bottomBar];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=bordered-box.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bordered-box.js","sourceRoot":"","sources":["../../src/components/bordered-box.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type CapabilityEnvOverrides = Readonly<Record<string, string | undefined>>;
|
|
2
|
-
/**
|
|
3
|
-
* Run a callback with controlled terminal capability environment variables.
|
|
4
|
-
*
|
|
5
|
-
* Resets the terminal capability cache before and after the callback so test
|
|
6
|
-
* assertions always reflect the requested environment.
|
|
7
|
-
*
|
|
8
|
-
* @param overrides - Temporary environment variable overrides
|
|
9
|
-
* @param run - Callback executed with overrides applied
|
|
10
|
-
* @returns Callback return value
|
|
11
|
-
*/
|
|
12
|
-
export declare function withCapabilityEnv<T>(overrides: CapabilityEnvOverrides, run: () => T): T;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=capability-env.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capability-env.d.ts","sourceRoot":"","sources":["../../src/test-utils/capability-env.ts"],"names":[],"mappings":"AAYA,KAAK,sBAAsB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CA+BvF"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { resetCapabilitiesCache } from "../terminal-image.js";
|
|
2
|
-
const CAPABILITY_ENV_KEYS = [
|
|
3
|
-
"COLORTERM",
|
|
4
|
-
"GHOSTTY_RESOURCES_DIR",
|
|
5
|
-
"ITERM_SESSION_ID",
|
|
6
|
-
"KITTY_WINDOW_ID",
|
|
7
|
-
"TERM",
|
|
8
|
-
"TERM_PROGRAM",
|
|
9
|
-
"WEZTERM_PANE",
|
|
10
|
-
];
|
|
11
|
-
/**
|
|
12
|
-
* Run a callback with controlled terminal capability environment variables.
|
|
13
|
-
*
|
|
14
|
-
* Resets the terminal capability cache before and after the callback so test
|
|
15
|
-
* assertions always reflect the requested environment.
|
|
16
|
-
*
|
|
17
|
-
* @param overrides - Temporary environment variable overrides
|
|
18
|
-
* @param run - Callback executed with overrides applied
|
|
19
|
-
* @returns Callback return value
|
|
20
|
-
*/
|
|
21
|
-
export function withCapabilityEnv(overrides, run) {
|
|
22
|
-
const previous = {};
|
|
23
|
-
for (const key of CAPABILITY_ENV_KEYS) {
|
|
24
|
-
previous[key] = process.env[key];
|
|
25
|
-
if (Object.hasOwn(overrides, key)) {
|
|
26
|
-
const value = overrides[key];
|
|
27
|
-
if (value === undefined) {
|
|
28
|
-
delete process.env[key];
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
process.env[key] = value;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
delete process.env[key];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
resetCapabilitiesCache();
|
|
39
|
-
try {
|
|
40
|
-
return run();
|
|
41
|
-
}
|
|
42
|
-
finally {
|
|
43
|
-
for (const key of CAPABILITY_ENV_KEYS) {
|
|
44
|
-
const value = previous[key];
|
|
45
|
-
if (value === undefined) {
|
|
46
|
-
delete process.env[key];
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
process.env[key] = value;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
resetCapabilitiesCache();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=capability-env.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capability-env.js","sourceRoot":"","sources":["../../src/test-utils/capability-env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,mBAAmB,GAAG;IAC3B,WAAW;IACX,uBAAuB;IACvB,kBAAkB;IAClB,iBAAiB;IACjB,MAAM;IACN,cAAc;IACd,cAAc;CACL,CAAC;AAIX;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAI,SAAiC,EAAE,GAAY;IACnF,MAAM,QAAQ,GAA8E,EAAE,CAAC;IAE/F,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACvC,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC;YACnC,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAC1B,CAAC;QACF,CAAC;aAAM,CAAC;YACP,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;IACF,CAAC;IAED,sBAAsB,EAAE,CAAC;IACzB,IAAI,CAAC;QACJ,OAAO,GAAG,EAAE,CAAC;IACd,CAAC;YAAS,CAAC;QACV,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;YACvC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC5B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAC1B,CAAC;QACF,CAAC;QACD,sBAAsB,EAAE,CAAC;IAC1B,CAAC;AACF,CAAC"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for Editor.addChangeListener — ensures change listeners fire
|
|
3
|
-
* alongside onChange without interfering with each other.
|
|
4
|
-
*/
|
|
5
|
-
import { describe, expect, test } from "bun:test";
|
|
6
|
-
import { Editor, type EditorTheme } from "../components/editor.js";
|
|
7
|
-
import type { TUI } from "../tui.js";
|
|
8
|
-
|
|
9
|
-
/** Minimal TUI mock providing only what Editor needs. */
|
|
10
|
-
function createMockTUI(): TUI {
|
|
11
|
-
return {
|
|
12
|
-
requestRender: () => {},
|
|
13
|
-
terminal: { rows: 40, cols: 80 },
|
|
14
|
-
} as unknown as TUI;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const theme: EditorTheme = {
|
|
18
|
-
borderColor: (s: string) => s,
|
|
19
|
-
selectList: {
|
|
20
|
-
selectedBg: (s: string) => s,
|
|
21
|
-
selectedFg: (s: string) => s,
|
|
22
|
-
normalBg: (s: string) => s,
|
|
23
|
-
normalFg: (s: string) => s,
|
|
24
|
-
matchHighlight: (s: string) => s,
|
|
25
|
-
descriptionFg: (s: string) => s,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/** Simulate typing a string character by character. */
|
|
30
|
-
function typeText(editor: Editor, text: string): void {
|
|
31
|
-
for (const char of text) {
|
|
32
|
-
editor.handleInput(char);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
describe("Editor.addChangeListener", () => {
|
|
37
|
-
test("listener fires on character input", () => {
|
|
38
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
39
|
-
const received: string[] = [];
|
|
40
|
-
editor.addChangeListener((text) => received.push(text));
|
|
41
|
-
|
|
42
|
-
typeText(editor, "hi");
|
|
43
|
-
expect(received).toEqual(["h", "hi"]);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
test("listener fires alongside onChange", () => {
|
|
47
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
48
|
-
const onChangeCalls: string[] = [];
|
|
49
|
-
const listenerCalls: string[] = [];
|
|
50
|
-
|
|
51
|
-
editor.onChange = (text) => onChangeCalls.push(text);
|
|
52
|
-
editor.addChangeListener((text) => listenerCalls.push(text));
|
|
53
|
-
|
|
54
|
-
typeText(editor, "ab");
|
|
55
|
-
expect(onChangeCalls).toEqual(["a", "ab"]);
|
|
56
|
-
expect(listenerCalls).toEqual(["a", "ab"]);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
test("overwriting onChange does not affect listener", () => {
|
|
60
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
61
|
-
const listenerCalls: string[] = [];
|
|
62
|
-
|
|
63
|
-
editor.addChangeListener((text) => listenerCalls.push(text));
|
|
64
|
-
|
|
65
|
-
// Simulate framework overwriting onChange (second write overwrites first)
|
|
66
|
-
editor.onChange = () => {};
|
|
67
|
-
editor.onChange = () => {}; // intentional: tests that listener survives overwrites
|
|
68
|
-
|
|
69
|
-
typeText(editor, "x");
|
|
70
|
-
expect(listenerCalls).toEqual(["x"]);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
test("multiple listeners all fire", () => {
|
|
74
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
75
|
-
const calls1: string[] = [];
|
|
76
|
-
const calls2: string[] = [];
|
|
77
|
-
const calls3: string[] = [];
|
|
78
|
-
|
|
79
|
-
editor.addChangeListener((text) => calls1.push(text));
|
|
80
|
-
editor.addChangeListener((text) => calls2.push(text));
|
|
81
|
-
editor.addChangeListener((text) => calls3.push(text));
|
|
82
|
-
|
|
83
|
-
typeText(editor, "z");
|
|
84
|
-
expect(calls1).toEqual(["z"]);
|
|
85
|
-
expect(calls2).toEqual(["z"]);
|
|
86
|
-
expect(calls3).toEqual(["z"]);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
test("listener fires on backspace", () => {
|
|
90
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
91
|
-
const received: string[] = [];
|
|
92
|
-
editor.addChangeListener((text) => received.push(text));
|
|
93
|
-
|
|
94
|
-
typeText(editor, "ab");
|
|
95
|
-
editor.handleInput("\x7f"); // backspace
|
|
96
|
-
expect(received).toEqual(["a", "ab", "a"]);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
test("listener fires on setText", () => {
|
|
100
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
101
|
-
const received: string[] = [];
|
|
102
|
-
editor.addChangeListener((text) => received.push(text));
|
|
103
|
-
|
|
104
|
-
editor.setText("hello world");
|
|
105
|
-
expect(received).toEqual(["hello world"]);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
test("listener fires on submit (text cleared)", () => {
|
|
109
|
-
const editor = new Editor(createMockTUI(), theme);
|
|
110
|
-
const received: string[] = [];
|
|
111
|
-
editor.addChangeListener((text) => received.push(text));
|
|
112
|
-
editor.onSubmit = () => {}; // prevent default submit behavior
|
|
113
|
-
|
|
114
|
-
typeText(editor, "test");
|
|
115
|
-
received.length = 0; // clear typing events
|
|
116
|
-
|
|
117
|
-
editor.handleInput("\r"); // Enter/submit
|
|
118
|
-
// After submit, editor text is cleared — listener gets ""
|
|
119
|
-
expect(received).toContain("");
|
|
120
|
-
});
|
|
121
|
-
});
|