@deepseek-harness-tui/dsh-tui 0.8.3 → 0.8.5
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 +29 -10
- package/bin/dsh-tui.js +50 -11
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
- package/dsh-ecosystem-spec/registry/README.md +14 -14
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
- package/lib/types/activityPrefs.d.ts +10 -0
- package/lib/types/activityPrefs.d.ts.map +1 -1
- package/lib/types/activityPrefs.js +17 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +1 -0
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +8 -3
- package/lib/types/components/MessageList.d.ts +4 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +4 -4
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +1 -3
- package/lib/types/components/SplitDiffView.d.ts +3 -1
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +12 -5
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +10 -2
- package/lib/types/components/TipsPanel.d.ts +14 -0
- package/lib/types/components/TipsPanel.d.ts.map +1 -0
- package/lib/types/components/TipsPanel.js +37 -0
- package/lib/types/components/activityFrames.d.ts +7 -28
- package/lib/types/components/activityFrames.d.ts.map +1 -1
- package/lib/types/components/activityFrames.js +7 -84
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +4 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +14 -3
- package/lib/types/dsh-adapter/channel.d.ts +17 -0
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +169 -33
- package/lib/types/dsh-adapter/index.d.ts +5 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +19 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +176 -4
- package/lib/types/dsh-adapter/settings-sections.d.ts +13 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +31 -6
- package/lib/types/effortPrefs.d.ts +7 -6
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -6
- package/lib/types/i18n.d.ts +42 -14
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +11 -4
- package/lib/types/ink/ink.d.ts +10 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +35 -1
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +15 -0
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +44 -7
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +109 -50
- package/lib/types/screens/StatusLine.d.ts +8 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +65 -42
- package/lib/types/settings-sections.d.ts +1 -1
- package/lib/types/settings-sections.d.ts.map +1 -1
- package/lib/types/tips.d.ts +30 -0
- package/lib/types/tips.d.ts.map +1 -0
- package/lib/types/tips.js +575 -0
- package/lib/types/tuiDisplayPrefs.d.ts +47 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -0
- package/lib/types/tuiDisplayPrefs.js +60 -0
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/command/LICENSE +21 -21
- package/node_modules/@dsh-std/command/README.md +26 -26
- package/node_modules/@dsh-std/command/README.zh.md +28 -28
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/command/package.json +22 -22
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/node_modules/@dsh-std/connection/README.md +42 -42
- package/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/node_modules/@dsh-std/connection/package.json +20 -20
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/core/LICENSE +21 -21
- package/node_modules/@dsh-std/core/README.md +13 -13
- package/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/core/package.json +21 -21
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/node_modules/@dsh-std/manifest/README.md +5 -5
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/manifest/package.json +20 -20
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/messages/LICENSE +21 -21
- package/node_modules/@dsh-std/messages/README.md +5 -5
- package/node_modules/@dsh-std/messages/README.zh.md +7 -7
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/messages/package.json +20 -20
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/node_modules/@dsh-std/presentation/README.md +27 -27
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/presentation/package.json +25 -25
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/storage/LICENSE +21 -21
- package/node_modules/@dsh-std/storage/README.md +5 -5
- package/node_modules/@dsh-std/storage/README.zh.md +7 -7
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/storage/package.json +20 -20
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
- package/package.json +8 -3
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/agent.cordis.yml +7 -5
- package/presets/liangshen/custom-bash.mjs +184 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
{
|
|
2
|
-
"profileVersion": "tui-admission/0.15",
|
|
3
|
-
"std": {
|
|
4
|
-
"repository": "https://github.com/Yan-Zero/dsh-std",
|
|
5
|
-
"submodule": "vendor/dsh-std",
|
|
6
|
-
"manifestVersion": "0.15"
|
|
7
|
-
},
|
|
8
|
-
"imports": [
|
|
9
|
-
{
|
|
10
|
-
"name": "commands",
|
|
11
|
-
"coordinates": {
|
|
12
|
-
"apiVersion": "commands.dsh/v1alpha1",
|
|
13
|
-
"kind": "Command"
|
|
14
|
-
},
|
|
15
|
-
"package": "@dsh-std/command",
|
|
16
|
-
"kind": "capability",
|
|
17
|
-
"permissions": [
|
|
18
|
-
"commands.invoke"
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "storage.local",
|
|
23
|
-
"coordinates": {
|
|
24
|
-
"apiVersion": "storage.dsh/v1alpha1",
|
|
25
|
-
"kind": "LocalStorage"
|
|
26
|
-
},
|
|
27
|
-
"package": "@dsh-std/storage",
|
|
28
|
-
"kind": "capability",
|
|
29
|
-
"permissions": [
|
|
30
|
-
"storage.local.read",
|
|
31
|
-
"storage.local.write"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "messages.observe",
|
|
36
|
-
"coordinates": {
|
|
37
|
-
"apiVersion": "messages.dsh/v1alpha1",
|
|
38
|
-
"kind": "MessageObserver"
|
|
39
|
-
},
|
|
40
|
-
"package": "@dsh-std/messages",
|
|
41
|
-
"kind": "event",
|
|
42
|
-
"permissions": [
|
|
43
|
-
"messages.observe.read"
|
|
44
|
-
],
|
|
45
|
-
"eventEnvelope": "@dsh-std/messages/schema/message-observer-envelope-0.15.json"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "presentation.open-external",
|
|
49
|
-
"coordinates": {
|
|
50
|
-
"apiVersion": "presentation.dsh/v1alpha1",
|
|
51
|
-
"kind": "OpenExternal"
|
|
52
|
-
},
|
|
53
|
-
"package": "@dsh-std/presentation",
|
|
54
|
-
"kind": "capability",
|
|
55
|
-
"permissions": []
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "presentation.user-interaction",
|
|
59
|
-
"coordinates": {
|
|
60
|
-
"apiVersion": "presentation.dsh/v1alpha1",
|
|
61
|
-
"kind": "UserInteraction"
|
|
62
|
-
},
|
|
63
|
-
"package": "@dsh-std/presentation",
|
|
64
|
-
"kind": "capability",
|
|
65
|
-
"permissions": []
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "presentation.external-redirect",
|
|
69
|
-
"coordinates": {
|
|
70
|
-
"apiVersion": "presentation.dsh/v1alpha1",
|
|
71
|
-
"kind": "ExternalRedirect"
|
|
72
|
-
},
|
|
73
|
-
"package": "@dsh-std/presentation",
|
|
74
|
-
"kind": "capability",
|
|
75
|
-
"permissions": []
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"definitions": [
|
|
79
|
-
{
|
|
80
|
-
"name": "tui.decision-events",
|
|
81
|
-
"authority": "dsh-tui",
|
|
82
|
-
"coordinates": {
|
|
83
|
-
"apiVersion": "tui.dsh/v1alpha1",
|
|
84
|
-
"kind": "DecisionEvents"
|
|
85
|
-
},
|
|
86
|
-
"kind": "capability",
|
|
87
|
-
"profile": "registry/contracts/decision-events-v1alpha1.json",
|
|
88
|
-
"profileHash": "sha256:56440dde1b00c210b22761a0cba139ce0a20207330567777cebe1e48b494ceb0",
|
|
89
|
-
"permissions": [
|
|
90
|
-
"session.input.intercept",
|
|
91
|
-
"session.rewind.intercept",
|
|
92
|
-
"session.switch.intercept",
|
|
93
|
-
"session.compact.intercept"
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"name": "tui.channel",
|
|
98
|
-
"authority": "dsh-tui",
|
|
99
|
-
"coordinates": {
|
|
100
|
-
"apiVersion": "tui.dsh/v1alpha1",
|
|
101
|
-
"kind": "Channel"
|
|
102
|
-
},
|
|
103
|
-
"kind": "capability",
|
|
104
|
-
"profile": "registry/contracts/tui-channel-v1alpha1.json",
|
|
105
|
-
"profileHash": "sha256:2d0668656d999a8cacd363cd3c76207f9392118be8a83e6dd5f81b54ae063fe6",
|
|
106
|
-
"permissions": []
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"extensions": [
|
|
110
|
-
{
|
|
111
|
-
"name": "workspace.provider",
|
|
112
|
-
"authority": "dsh-std",
|
|
113
|
-
"coordinates": {
|
|
114
|
-
"apiVersion": "workspace.dsh/v1alpha1",
|
|
115
|
-
"kind": "WorkspaceProvider"
|
|
116
|
-
},
|
|
117
|
-
"kind": "extension",
|
|
118
|
-
"package": "@dsh-std/workspace",
|
|
119
|
-
"permissions": []
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"name": "tui.settings-section",
|
|
123
|
-
"authority": "dsh-tui",
|
|
124
|
-
"coordinates": {
|
|
125
|
-
"apiVersion": "tui.dsh/v1alpha1",
|
|
126
|
-
"kind": "SettingsSection"
|
|
127
|
-
},
|
|
128
|
-
"kind": "extension",
|
|
129
|
-
"profile": "registry/contracts/settings-section-v1alpha1.json",
|
|
130
|
-
"profileHash": "sha256:685b0f17fe489f458e9b799811f61c42b858330584e95ecb97e7216b5be100ac",
|
|
131
|
-
"permissions": []
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "tui.scene",
|
|
135
|
-
"authority": "dsh-tui",
|
|
136
|
-
"coordinates": {
|
|
137
|
-
"apiVersion": "tui.dsh/v1alpha1",
|
|
138
|
-
"kind": "Scene"
|
|
139
|
-
},
|
|
140
|
-
"kind": "extension",
|
|
141
|
-
"profile": "registry/contracts/scene-v1alpha1.json",
|
|
142
|
-
"profileHash": "sha256:69ce3ae26d60dea2ed170376db8a1fb5860c94bd192c62681423c1d848ec2b26",
|
|
143
|
-
"permissions": []
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"facetApiVersions": [
|
|
147
|
-
"v1alpha1"
|
|
148
|
-
]
|
|
149
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"profileVersion": "tui-admission/0.15",
|
|
3
|
+
"std": {
|
|
4
|
+
"repository": "https://github.com/Yan-Zero/dsh-std",
|
|
5
|
+
"submodule": "vendor/dsh-std",
|
|
6
|
+
"manifestVersion": "0.15"
|
|
7
|
+
},
|
|
8
|
+
"imports": [
|
|
9
|
+
{
|
|
10
|
+
"name": "commands",
|
|
11
|
+
"coordinates": {
|
|
12
|
+
"apiVersion": "commands.dsh/v1alpha1",
|
|
13
|
+
"kind": "Command"
|
|
14
|
+
},
|
|
15
|
+
"package": "@dsh-std/command",
|
|
16
|
+
"kind": "capability",
|
|
17
|
+
"permissions": [
|
|
18
|
+
"commands.invoke"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "storage.local",
|
|
23
|
+
"coordinates": {
|
|
24
|
+
"apiVersion": "storage.dsh/v1alpha1",
|
|
25
|
+
"kind": "LocalStorage"
|
|
26
|
+
},
|
|
27
|
+
"package": "@dsh-std/storage",
|
|
28
|
+
"kind": "capability",
|
|
29
|
+
"permissions": [
|
|
30
|
+
"storage.local.read",
|
|
31
|
+
"storage.local.write"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "messages.observe",
|
|
36
|
+
"coordinates": {
|
|
37
|
+
"apiVersion": "messages.dsh/v1alpha1",
|
|
38
|
+
"kind": "MessageObserver"
|
|
39
|
+
},
|
|
40
|
+
"package": "@dsh-std/messages",
|
|
41
|
+
"kind": "event",
|
|
42
|
+
"permissions": [
|
|
43
|
+
"messages.observe.read"
|
|
44
|
+
],
|
|
45
|
+
"eventEnvelope": "@dsh-std/messages/schema/message-observer-envelope-0.15.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "presentation.open-external",
|
|
49
|
+
"coordinates": {
|
|
50
|
+
"apiVersion": "presentation.dsh/v1alpha1",
|
|
51
|
+
"kind": "OpenExternal"
|
|
52
|
+
},
|
|
53
|
+
"package": "@dsh-std/presentation",
|
|
54
|
+
"kind": "capability",
|
|
55
|
+
"permissions": []
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "presentation.user-interaction",
|
|
59
|
+
"coordinates": {
|
|
60
|
+
"apiVersion": "presentation.dsh/v1alpha1",
|
|
61
|
+
"kind": "UserInteraction"
|
|
62
|
+
},
|
|
63
|
+
"package": "@dsh-std/presentation",
|
|
64
|
+
"kind": "capability",
|
|
65
|
+
"permissions": []
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "presentation.external-redirect",
|
|
69
|
+
"coordinates": {
|
|
70
|
+
"apiVersion": "presentation.dsh/v1alpha1",
|
|
71
|
+
"kind": "ExternalRedirect"
|
|
72
|
+
},
|
|
73
|
+
"package": "@dsh-std/presentation",
|
|
74
|
+
"kind": "capability",
|
|
75
|
+
"permissions": []
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"definitions": [
|
|
79
|
+
{
|
|
80
|
+
"name": "tui.decision-events",
|
|
81
|
+
"authority": "dsh-tui",
|
|
82
|
+
"coordinates": {
|
|
83
|
+
"apiVersion": "tui.dsh/v1alpha1",
|
|
84
|
+
"kind": "DecisionEvents"
|
|
85
|
+
},
|
|
86
|
+
"kind": "capability",
|
|
87
|
+
"profile": "registry/contracts/decision-events-v1alpha1.json",
|
|
88
|
+
"profileHash": "sha256:56440dde1b00c210b22761a0cba139ce0a20207330567777cebe1e48b494ceb0",
|
|
89
|
+
"permissions": [
|
|
90
|
+
"session.input.intercept",
|
|
91
|
+
"session.rewind.intercept",
|
|
92
|
+
"session.switch.intercept",
|
|
93
|
+
"session.compact.intercept"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "tui.channel",
|
|
98
|
+
"authority": "dsh-tui",
|
|
99
|
+
"coordinates": {
|
|
100
|
+
"apiVersion": "tui.dsh/v1alpha1",
|
|
101
|
+
"kind": "Channel"
|
|
102
|
+
},
|
|
103
|
+
"kind": "capability",
|
|
104
|
+
"profile": "registry/contracts/tui-channel-v1alpha1.json",
|
|
105
|
+
"profileHash": "sha256:2d0668656d999a8cacd363cd3c76207f9392118be8a83e6dd5f81b54ae063fe6",
|
|
106
|
+
"permissions": []
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"extensions": [
|
|
110
|
+
{
|
|
111
|
+
"name": "workspace.provider",
|
|
112
|
+
"authority": "dsh-std",
|
|
113
|
+
"coordinates": {
|
|
114
|
+
"apiVersion": "workspace.dsh/v1alpha1",
|
|
115
|
+
"kind": "WorkspaceProvider"
|
|
116
|
+
},
|
|
117
|
+
"kind": "extension",
|
|
118
|
+
"package": "@dsh-std/workspace",
|
|
119
|
+
"permissions": []
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "tui.settings-section",
|
|
123
|
+
"authority": "dsh-tui",
|
|
124
|
+
"coordinates": {
|
|
125
|
+
"apiVersion": "tui.dsh/v1alpha1",
|
|
126
|
+
"kind": "SettingsSection"
|
|
127
|
+
},
|
|
128
|
+
"kind": "extension",
|
|
129
|
+
"profile": "registry/contracts/settings-section-v1alpha1.json",
|
|
130
|
+
"profileHash": "sha256:685b0f17fe489f458e9b799811f61c42b858330584e95ecb97e7216b5be100ac",
|
|
131
|
+
"permissions": []
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "tui.scene",
|
|
135
|
+
"authority": "dsh-tui",
|
|
136
|
+
"coordinates": {
|
|
137
|
+
"apiVersion": "tui.dsh/v1alpha1",
|
|
138
|
+
"kind": "Scene"
|
|
139
|
+
},
|
|
140
|
+
"kind": "extension",
|
|
141
|
+
"profile": "registry/contracts/scene-v1alpha1.json",
|
|
142
|
+
"profileHash": "sha256:69ce3ae26d60dea2ed170376db8a1fb5860c94bd192c62681423c1d848ec2b26",
|
|
143
|
+
"permissions": []
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"facetApiVersions": [
|
|
147
|
+
"v1alpha1"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* unknown preset left behind by an older version) just falls back to the
|
|
8
8
|
* default preset.
|
|
9
9
|
*/
|
|
10
|
+
import { type WorkingActivityConfig } from 'dsh-working-activity/config';
|
|
10
11
|
/**
|
|
11
12
|
* Parse a persisted `{ frames }` value; anything else yields undefined.
|
|
12
13
|
* @param text - Raw file contents.
|
|
@@ -19,6 +20,15 @@ export declare function parseActivityFrames(text: string): string | undefined;
|
|
|
19
20
|
* @returns The persisted preset name, if any.
|
|
20
21
|
*/
|
|
21
22
|
export declare function readActivityFrames(dir?: string): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Read the full pi-style working-activity config (frames / mode / features /
|
|
25
|
+
* customPhrases / customActions / narrate / thresholds) from the same JSON
|
|
26
|
+
* file the `/activity` command writes, parsed by the wa package. Best-effort:
|
|
27
|
+
* a missing or corrupt file yields undefined (callers use their defaults).
|
|
28
|
+
* @param dir - Prefs directory (injectable for tests).
|
|
29
|
+
* @returns The parsed config, or undefined when unreadable.
|
|
30
|
+
*/
|
|
31
|
+
export declare function readActivityConfig(dir?: string): WorkingActivityConfig | undefined;
|
|
22
32
|
/**
|
|
23
33
|
* Persist the chosen indicator preset (best effort).
|
|
24
34
|
* @param name - Preset name to persist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activityPrefs.d.ts","sourceRoot":"","sources":["../../src/activityPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"activityPrefs.d.ts","sourceRoot":"","sources":["../../src/activityPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAA8B,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAKpG;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASpE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAM9E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAkB,GAAG,qBAAqB,GAAG,SAAS,CAM7F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQlF"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
11
11
|
import { join } from 'node:path';
|
|
12
12
|
import { isPresetName } from './components/activityFrames.js';
|
|
13
|
+
import { parseWorkingActivityConfig } from 'dsh-working-activity/config';
|
|
13
14
|
import { DATA_DIR } from './utils/paths.js';
|
|
14
15
|
const PREFS_DIR = DATA_DIR;
|
|
15
16
|
/**
|
|
@@ -42,6 +43,22 @@ export function readActivityFrames(dir = PREFS_DIR) {
|
|
|
42
43
|
return undefined;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Read the full pi-style working-activity config (frames / mode / features /
|
|
48
|
+
* customPhrases / customActions / narrate / thresholds) from the same JSON
|
|
49
|
+
* file the `/activity` command writes, parsed by the wa package. Best-effort:
|
|
50
|
+
* a missing or corrupt file yields undefined (callers use their defaults).
|
|
51
|
+
* @param dir - Prefs directory (injectable for tests).
|
|
52
|
+
* @returns The parsed config, or undefined when unreadable.
|
|
53
|
+
*/
|
|
54
|
+
export function readActivityConfig(dir = PREFS_DIR) {
|
|
55
|
+
try {
|
|
56
|
+
return parseWorkingActivityConfig(readFileSync(join(dir, 'working-activity.json'), 'utf8')).config;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
45
62
|
/**
|
|
46
63
|
* Persist the chosen indicator preset (best effort).
|
|
47
64
|
* @param name - Preset name to persist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAElF,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,KAAK,SAAS,qBAAqB,EAAE,CAAA;AAEpG;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAElF,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,KAAK,SAAS,qBAAqB,EAAE,CAAA;AAEpG;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,EA2DxC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAIhG;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GACX;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAIhD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,SAAS,YAAY,EAAmB,GAC7C,OAAO,CAKT;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,SAAS,YAAY,EAAmB,GAC7C,YAAY,EAAE,CAKhB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,SAAS,YAAY,EAAmB,EAC/C,QAAQ,GAAE,eAA0B,GACnC,iBAAiB,EAAE,CAoCrB"}
|
package/lib/types/commands.js
CHANGED
|
@@ -66,6 +66,7 @@ export const LOCAL_COMMANDS = [
|
|
|
66
66
|
{ name: 'workspace', description: 'Resume, rename, or open a workspace' },
|
|
67
67
|
// Help / exit
|
|
68
68
|
{ name: 'help', description: 'Show shortcuts and commands' },
|
|
69
|
+
{ name: 'tips', description: 'Show usage tips and shortcuts' },
|
|
69
70
|
{ name: 'exit', description: 'Exit dsh-tui' },
|
|
70
71
|
{ name: 'quit', description: 'Exit dsh-tui', tag: 'alias of /exit' },
|
|
71
72
|
{ name: 'q', description: 'Exit dsh-tui', tag: 'alias of /exit' },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type Tip } from '../tips.js';
|
|
2
3
|
/**
|
|
3
4
|
* The header splash: one layout, two phases. The **opening** (~3.4s, once)
|
|
4
5
|
* plays the hand-drawn whale animation (blink → water-spout bloom → tail
|
|
@@ -13,11 +14,13 @@ import React from 'react';
|
|
|
13
14
|
* the whale the welcome tagline, centered under the art, in ice
|
|
14
15
|
* blue. Narrow terminals drop the whale and keep the text column.
|
|
15
16
|
*/
|
|
16
|
-
export declare function LogoV2({ model, effort, cwd, skipIntro, }: {
|
|
17
|
+
export declare function LogoV2({ model, effort, cwd, skipIntro, tip, }: {
|
|
17
18
|
model: string;
|
|
18
19
|
effort?: string | undefined;
|
|
19
20
|
cwd: string;
|
|
20
21
|
/** Test seam: mount straight into the settled header (probes skip the intro). */
|
|
21
22
|
skipIntro?: boolean;
|
|
23
|
+
/** Test seam: pin the startup tip line (probes need a deterministic tip). */
|
|
24
|
+
tip?: Tip;
|
|
22
25
|
}): React.ReactNode;
|
|
23
26
|
//# sourceMappingURL=LogoV2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogoV2.d.ts","sourceRoot":"","sources":["../../../src/components/LogoV2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"LogoV2.d.ts","sourceRoot":"","sources":["../../../src/components/LogoV2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,YAAY,CAAA;AAuDpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,MAAM,EACN,GAAG,EACH,SAAiB,EACjB,GAAG,GACJ,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,iFAAiF;IACjF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6EAA6E;IAC7E,GAAG,CAAC,EAAE,GAAG,CAAA;CACV,GAAG,KAAK,CAAC,SAAS,CAqFlB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { t as tr } from '../i18n.js';
|
|
3
|
+
import { getLang, t as tr } from '../i18n.js';
|
|
4
|
+
import { pickRandomTip } from '../tips.js';
|
|
4
5
|
import { readFileSync } from 'node:fs';
|
|
5
6
|
import { dirname, join } from 'node:path';
|
|
6
7
|
import { fileURLToPath } from 'node:url';
|
|
@@ -64,7 +65,7 @@ function capitalize(text) {
|
|
|
64
65
|
* the whale the welcome tagline, centered under the art, in ice
|
|
65
66
|
* blue. Narrow terminals drop the whale and keep the text column.
|
|
66
67
|
*/
|
|
67
|
-
export function LogoV2({ model, effort, cwd, skipIntro = false, }) {
|
|
68
|
+
export function LogoV2({ model, effort, cwd, skipIntro = false, tip, }) {
|
|
68
69
|
const [step, setStep] = React.useState(skipIntro ? OPENING_SEQUENCE.length : 0);
|
|
69
70
|
const settled = step >= OPENING_SEQUENCE.length;
|
|
70
71
|
// Opening clock: drives the shimmer sweep and big-text highlight only
|
|
@@ -94,11 +95,15 @@ export function LogoV2({ model, effort, cwd, skipIntro = false, }) {
|
|
|
94
95
|
// off-screen, leaving the static gradient behind.
|
|
95
96
|
const t = settled ? 0 : time;
|
|
96
97
|
const tagline = tr('logo-tagline');
|
|
98
|
+
// One random tip per mount: the settled header must not re-roll on every
|
|
99
|
+
// repaint (language switch, terminal resize), or the line would flicker.
|
|
100
|
+
// `tip` is a test seam; production always passes undefined and rolls.
|
|
101
|
+
const [randomTip] = React.useState(() => tip ?? pickRandomTip());
|
|
97
102
|
// Indent that centers the tagline under the whale art's bounding box.
|
|
98
103
|
const welcomePad = showWhale
|
|
99
104
|
? Math.max(0, Math.round(WHALE_CENTER - stringWidth(tagline) / 2))
|
|
100
105
|
: 2;
|
|
101
106
|
const bigDeepSeek = renderBigText('DEEPSEEK', t, wordmarkRGB, taglineRGB, FLASH, 60);
|
|
102
107
|
const bigHarness = renderBigText('HARNESS', t, taglineRGB, PALE, FLASH, 60);
|
|
103
|
-
return (_jsxs(Box, { ref: ref, flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { flexDirection: "row", gap: 2, width: "100%", alignItems: "center", children: [showWhale && _jsx(WhaleArt, { frameIndex: frameIndex, width: FULL_WHALE_WIDTH }), _jsxs(Box, { flexDirection: "column", flexShrink: 1, children: [_jsxs(Text, { wrap: "truncate-end", children: [sweep('✦ dsh-TUI', t, wordmarkRGB, wordmarkShimmerRGB, 60), _jsx(Text, { dimColor: true, children: ' v' + VERSION })] }), bigDeepSeek.map((row, index) => (_jsx(Text, { wrap: "truncate-end", children: row }, `ds-${index}`))), bigHarness.map((row, index) => (_jsx(Text, { wrap: "truncate-end", children: row }, `h-${index}`))), _jsxs(Text, { wrap: "truncate-end", children: [model, effort !== undefined && _jsx(Text, { dimColor: true, children: ' · ' + capitalize(effort) + ' effort' })] }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: cwd }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { dimColor: true, children: tr('logo-tip-prefix') }),
|
|
108
|
+
return (_jsxs(Box, { ref: ref, flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { flexDirection: "row", gap: 2, width: "100%", alignItems: "center", children: [showWhale && _jsx(WhaleArt, { frameIndex: frameIndex, width: FULL_WHALE_WIDTH }), _jsxs(Box, { flexDirection: "column", flexShrink: 1, children: [_jsxs(Text, { wrap: "truncate-end", children: [sweep('✦ dsh-TUI', t, wordmarkRGB, wordmarkShimmerRGB, 60), _jsx(Text, { dimColor: true, children: ' v' + VERSION })] }), bigDeepSeek.map((row, index) => (_jsx(Text, { wrap: "truncate-end", children: row }, `ds-${index}`))), bigHarness.map((row, index) => (_jsx(Text, { wrap: "truncate-end", children: row }, `h-${index}`))), _jsxs(Text, { wrap: "truncate-end", children: [model, effort !== undefined && _jsx(Text, { dimColor: true, children: ' · ' + capitalize(effort) + ' effort' })] }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: cwd }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { dimColor: true, children: tr('logo-tip-prefix') }), getLang() === 'zh' ? randomTip.zh : randomTip.en, _jsx(Text, { dimColor: true, children: ' · /tips ' + tr('logo-tip-more') })] })] })] }), _jsx(Box, { marginTop: 1, paddingLeft: welcomePad, children: _jsx(Text, { children: sweep(tagline, t, taglineRGB, FLASH, 60) }) })] }));
|
|
104
109
|
}
|
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { type ScrollBoxHandle } from '../ui.js';
|
|
3
3
|
import type { ChatRow } from '../dsh-adapter/channel.js';
|
|
4
4
|
import type { DOMElement } from '../ink/dom.js';
|
|
5
|
-
|
|
5
|
+
import type { ToolBackground } from '../tuiDisplayPrefs.js';
|
|
6
|
+
export declare function MessageList({ rows, expanded, expandedRows, selectedId, onToggleRow, model, diffLayout, thinkingFold, toolBackground, showAll, onToggleAll, onLoadOlder, thinkingVisible, registerRowRef, scrollHandle, forceMountRowId, newSinceRowId, onUnseenCount, failureHintRowId, failureHint, }: {
|
|
6
7
|
rows: readonly ChatRow[];
|
|
7
8
|
expanded: boolean;
|
|
8
9
|
expandedRows: ReadonlySet<number>;
|
|
@@ -13,6 +14,8 @@ export declare function MessageList({ rows, expanded, expandedRows, selectedId,
|
|
|
13
14
|
diffLayout?: 'auto' | 'split' | 'unified';
|
|
14
15
|
/** Thinking-block display mode from channel (`preview`/`full`). */
|
|
15
16
|
thinkingFold?: 'preview' | 'full';
|
|
17
|
+
/** Tool-card background treatment from the live channel settings. */
|
|
18
|
+
toolBackground?: ToolBackground;
|
|
16
19
|
showAll: boolean;
|
|
17
20
|
onToggleAll: () => void;
|
|
18
21
|
/** Restore folded-away older rows from the session log (CC-style "load
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAyC,MAAM,2BAA2B,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAyC,MAAM,2BAA2B,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAa/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA2B3D,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAmB,EACnB,YAAwB,EACxB,cAAuB,EACvB,OAAO,EACP,WAAW,EACX,WAAW,EACX,eAAsB,EACtB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IACzC,mEAAmE;IACnE,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACjC,qEAAqE;IACrE,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB;2EACuE;IACvE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/D,oDAAoD;IACpD,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IACrC,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B;8EAC0E;IAC1E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,qBA+VA;AAsRD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,GAAG,GACJ,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,KAAK,CAAC,SAAS,CAMlB"}
|
|
@@ -37,7 +37,7 @@ const DEFAULT_ROW_HEIGHT = 2;
|
|
|
37
37
|
/** Cold-start estimate of the header block above the rows; corrected by the
|
|
38
38
|
* first layout measurement. */
|
|
39
39
|
const DEFAULT_HEADER_LINES = 14;
|
|
40
|
-
export function MessageList({ rows, expanded, expandedRows, selectedId, onToggleRow, model, diffLayout = 'auto', thinkingFold = 'preview', showAll, onToggleAll, onLoadOlder, thinkingVisible = true, registerRowRef, scrollHandle, forceMountRowId, newSinceRowId, onUnseenCount, failureHintRowId, failureHint, }) {
|
|
40
|
+
export function MessageList({ rows, expanded, expandedRows, selectedId, onToggleRow, model, diffLayout = 'auto', thinkingFold = 'preview', toolBackground = 'none', showAll, onToggleAll, onLoadOlder, thinkingVisible = true, registerRowRef, scrollHandle, forceMountRowId, newSinceRowId, onUnseenCount, failureHintRowId, failureHint, }) {
|
|
41
41
|
const hiddenCount = rows.length - MAX_RENDERED_ROWS;
|
|
42
42
|
// The thinking filter runs BEFORE virtualization so window indices line up.
|
|
43
43
|
const visibleRows = (showAll || hiddenCount <= 0
|
|
@@ -334,10 +334,10 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
|
|
|
334
334
|
// spacing; only the very first row of the whole list has none.
|
|
335
335
|
const addMargin = margins.get(row.id) === true;
|
|
336
336
|
const tool = row.tool;
|
|
337
|
-
return (_jsx(MemoRow, { rowId: row.id, kind: row.kind, text: row.text, executionTarget: row.executionTarget, streaming: row.streaming === true, durationMs: row.durationMs, time: row.time, addMargin: addMargin, isSelected: selectedId === row.id, isExpanded: expandedRows.has(row.id), expanded: expanded, model: model, diffLayout: diffLayout, thinkingFold: thinkingFold, background: rowBackground(row.id), toolCallId: tool?.callId, toolName: tool?.name, toolArgsText: tool?.argsText, toolArgsFull: tool?.argsFull, toolStatus: tool?.status, toolResultText: tool?.resultText, toolResultFull: tool?.resultFull, toolErrorText: tool?.errorText, toolFootnote: failureHintRowId === row.id ? failureHint : undefined, toolCallView: tool?.callView, toolResultView: tool?.resultView, toolStartedAt: tool?.startedAt, toolDurationMs: tool?.durationMs, nowSec: tool?.status === 'running' ? nowSec : undefined, onToggleRow: onToggleRow, setRowRef: setRowRef }, row.id));
|
|
337
|
+
return (_jsx(MemoRow, { rowId: row.id, kind: row.kind, text: row.text, executionTarget: row.executionTarget, streaming: row.streaming === true, durationMs: row.durationMs, time: row.time, addMargin: addMargin, isSelected: selectedId === row.id, isExpanded: expandedRows.has(row.id), expanded: expanded, model: model, diffLayout: diffLayout, thinkingFold: thinkingFold, toolBackground: toolBackground, background: rowBackground(row.id), toolCallId: tool?.callId, toolName: tool?.name, toolArgsText: tool?.argsText, toolArgsFull: tool?.argsFull, toolStatus: tool?.status, toolResultText: tool?.resultText, toolResultFull: tool?.resultFull, toolErrorText: tool?.errorText, toolFootnote: failureHintRowId === row.id ? failureHint : undefined, toolCallView: tool?.callView, toolResultView: tool?.resultView, toolStartedAt: tool?.startedAt, toolDurationMs: tool?.durationMs, nowSec: tool?.status === 'running' ? nowSec : undefined, onToggleRow: onToggleRow, setRowRef: setRowRef }, row.id));
|
|
338
338
|
}), bottomPad > 0 && _jsx(Box, { height: bottomPad, flexShrink: 0 })] }));
|
|
339
339
|
}
|
|
340
|
-
function TranscriptRow({ rowId, kind, text, executionTarget, streaming, durationMs, time, addMargin, isSelected, isExpanded, expanded, model, diffLayout, thinkingFold, background, toolCallId, toolName, toolArgsText, toolArgsFull, toolStatus, toolResultText, toolResultFull, toolErrorText, toolFootnote, toolCallView, toolResultView, toolStartedAt, toolDurationMs, onToggleRow, setRowRef, }) {
|
|
340
|
+
function TranscriptRow({ rowId, kind, text, executionTarget, streaming, durationMs, time, addMargin, isSelected, isExpanded, expanded, model, diffLayout, thinkingFold, toolBackground, background, toolCallId, toolName, toolArgsText, toolArgsFull, toolStatus, toolResultText, toolResultFull, toolErrorText, toolFootnote, toolCallView, toolResultView, toolStartedAt, toolDurationMs, onToggleRow, setRowRef, }) {
|
|
341
341
|
const ref = React.useCallback((el) => {
|
|
342
342
|
setRowRef(rowId, el);
|
|
343
343
|
}, [setRowRef, rowId]);
|
|
@@ -382,7 +382,7 @@ function TranscriptRow({ rowId, kind, text, executionTarget, streaming, duration
|
|
|
382
382
|
startedAt: toolStartedAt,
|
|
383
383
|
durationMs: toolDurationMs,
|
|
384
384
|
};
|
|
385
|
-
return (_jsx(Box, { flexDirection: "column", ref: ref, children: _jsx(AssistantToolUseMessage, { tool: tool, addMargin: addMargin, verbose: isExpanded || expanded, isSelected: isSelected, isExpanded: isExpanded, footnote: toolFootnote, diffLayout: diffLayout }) }));
|
|
385
|
+
return (_jsx(Box, { flexDirection: "column", ref: ref, children: _jsx(AssistantToolUseMessage, { tool: tool, addMargin: addMargin, verbose: isExpanded || expanded, isSelected: isSelected, isExpanded: isExpanded, footnote: toolFootnote, diffLayout: diffLayout, toolBackground: toolBackground }) }));
|
|
386
386
|
}
|
|
387
387
|
case 'notice':
|
|
388
388
|
return (_jsx(Box, { marginTop: 1, ref: ref, children: _jsx(Divider, { title: ` ${text} ` }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAkDxD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,OAAO,CAAA;IAClB,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,IAAI,IAAI,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IACrD,6EAA6E;IAC7E,eAAe,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,IAAI,IAAI,CAAA;IACvB,8EAA8E;IAC9E,eAAe,CAAC,IAAI,IAAI,CAAA;IACxB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,GACd,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAkDxD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,OAAO,CAAA;IAClB,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,IAAI,IAAI,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IACrD,6EAA6E;IAC7E,eAAe,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,IAAI,IAAI,CAAA;IACvB,8EAA8E;IAC9E,eAAe,CAAC,IAAI,IAAI,CAAA;IACxB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,GACd,EAAE,gBAAgB,qBA25BlB"}
|
|
@@ -802,9 +802,7 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
|
|
|
802
802
|
return;
|
|
803
803
|
}
|
|
804
804
|
escPendingRef.current = true;
|
|
805
|
-
channel.notify(value.length === 0
|
|
806
|
-
? 'Press Esc again to rewind'
|
|
807
|
-
: 'Press Esc again to clear');
|
|
805
|
+
channel.notify(value.length === 0 ? t('esc-again-rewind') : t('esc-again-clear'));
|
|
808
806
|
escTimerRef.current = setTimeout(() => {
|
|
809
807
|
escPendingRef.current = false;
|
|
810
808
|
}, 3000);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToolFileDiff } from '../dsh-adapter/channel.js';
|
|
3
3
|
import { type CliHighlight } from '../cc/cliHighlight.js';
|
|
4
|
+
import type { ToolBackground } from '../tuiDisplayPrefs.js';
|
|
4
5
|
/** chalk style for one raw theme value. Accepts every form the theme
|
|
5
6
|
* loader documents: #rgb, #rrggbb, #rrggbbaa (alpha stripped), rgb() with
|
|
6
7
|
* or without spaces, ansi256(n), ansi:name (issue #250, P2-5). */
|
|
@@ -17,12 +18,13 @@ export declare function highlightLines(text: string, language: string | undefine
|
|
|
17
18
|
text: string;
|
|
18
19
|
color?: string;
|
|
19
20
|
}[][] | undefined;
|
|
20
|
-
export declare function SplitDiffView({ diffs, width, maxRows, verbose, }: {
|
|
21
|
+
export declare function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground, }: {
|
|
21
22
|
readonly diffs: readonly ToolFileDiff[];
|
|
22
23
|
/** Content width available to the whole two-pane block (divider included). */
|
|
23
24
|
readonly width: number;
|
|
24
25
|
/** Row budget when not verbose; overflow folds into one hint row. */
|
|
25
26
|
readonly maxRows: number;
|
|
26
27
|
readonly verbose: boolean;
|
|
28
|
+
readonly toolBackground?: ToolBackground;
|
|
27
29
|
}): React.ReactNode;
|
|
28
30
|
//# sourceMappingURL=SplitDiffView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAsF3D;;mEAEmE;AACnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAmBtE;AAUD;;;oCAGoC;AACpC,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAuB9E;AAuBD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,EAAE,EAAE,YAAY,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,EAC7D,QAAQ,EAAE,MAAM,GACf,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,GAAG,SAAS,CAe3D;AAsOD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAuB,GACxB,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAA;CACzC,GAAG,KAAK,CAAC,SAAS,CAiGlB"}
|
|
@@ -327,9 +327,16 @@ function alignFileDiff(fileIndex, oldText, newText) {
|
|
|
327
327
|
return rows;
|
|
328
328
|
}
|
|
329
329
|
// --- rendering --------------------------------------------------------------
|
|
330
|
-
function PaneLine({ side, kind, width, tone, padLeft = false, }) {
|
|
330
|
+
function PaneLine({ side, kind, width, tone, toolBackground, padLeft = false, }) {
|
|
331
|
+
const ordinaryBackground = toolBackground === 'subtle'
|
|
332
|
+
? 'toolCardBackgroundDim'
|
|
333
|
+
: toolBackground === 'strong'
|
|
334
|
+
? 'toolCardBackground'
|
|
335
|
+
: undefined;
|
|
336
|
+
// Additions/removals keep their semantic tint; unchanged and empty panes
|
|
337
|
+
// inherit the configured ordinary tool-card surface.
|
|
331
338
|
const backgroundColor = kind === 'context'
|
|
332
|
-
?
|
|
339
|
+
? ordinaryBackground
|
|
333
340
|
: tone === 'old'
|
|
334
341
|
? 'diffRemovedDimmed'
|
|
335
342
|
: 'diffAddedDimmed';
|
|
@@ -340,7 +347,7 @@ function PaneLine({ side, kind, width, tone, padLeft = false, }) {
|
|
|
340
347
|
const prefix = padLeft ? ` ${marker}` : marker;
|
|
341
348
|
return (_jsxs(Box, { width: width, flexShrink: 0, backgroundColor: backgroundColor, children: [_jsx(Text, { dimColor: true, backgroundColor: backgroundColor, children: `${prefix} ` }), side === undefined ? (_jsx(Text, { backgroundColor: backgroundColor, children: " " })) : (_jsx(Text, { wrap: "truncate", backgroundColor: backgroundColor, children: side.segments.map((segment, index) => segment.changed ? (_jsx(Text, { color: wordColor, bold: true, backgroundColor: backgroundColor, children: segment.text }, index)) : (_jsx(Text, { color: segment.color, backgroundColor: backgroundColor, children: segment.text }, index))) }))] }));
|
|
342
349
|
}
|
|
343
|
-
export function SplitDiffView({ diffs, width, maxRows, verbose, }) {
|
|
350
|
+
export function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground = 'none', }) {
|
|
344
351
|
const [hl, setHl] = React.useState(null);
|
|
345
352
|
React.useEffect(() => {
|
|
346
353
|
let mounted = true;
|
|
@@ -399,7 +406,7 @@ export function SplitDiffView({ diffs, width, maxRows, verbose, }) {
|
|
|
399
406
|
next: highlightLines(expandTabs(diff.newText), language, hl, chTheme, themeSig),
|
|
400
407
|
};
|
|
401
408
|
});
|
|
402
|
-
return (_jsxs(Box, { flexDirection: "column", width: paneWidth * 2 + 1,
|
|
409
|
+
return (_jsxs(Box, { flexDirection: "column", width: paneWidth * 2 + 1, children: [visible.map((row, index) => {
|
|
403
410
|
if ('separator' in row) {
|
|
404
411
|
return (_jsx(Box, { width: paneWidth * 2 + 1, children: _jsx(Text, { dimColor: true, wrap: "truncate", children: row.separator === '⋯' ? '⋯' : ` ${row.separator}` }) }, index));
|
|
405
412
|
}
|
|
@@ -412,6 +419,6 @@ export function SplitDiffView({ diffs, width, maxRows, verbose, }) {
|
|
|
412
419
|
const newSide = row.newWords === undefined
|
|
413
420
|
? undefined
|
|
414
421
|
: { segments: newRuns !== undefined ? mergeRuns(newRuns, row.newWords) : row.newWords };
|
|
415
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(PaneLine, { side: oldSide, kind: row.kind === 'add' ? 'context' : row.kind, tone: "old", width: paneWidth }), _jsx(Box, { width: 1, flexShrink: 0,
|
|
422
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(PaneLine, { side: oldSide, kind: row.kind === 'add' ? 'context' : row.kind, tone: "old", width: paneWidth, toolBackground: toolBackground }), _jsx(Box, { width: 1, flexShrink: 0, children: _jsx(Text, { dimColor: true, children: "\u2502" }) }), _jsx(PaneLine, { side: newSide, kind: row.kind === 'del' ? 'context' : row.kind, tone: "new", width: paneWidth, toolBackground: toolBackground, padLeft: true })] }, index));
|
|
416
423
|
}), hidden > 0 && (_jsx(Text, { dimColor: true, children: `… +${hidden} lines (ctrl+o to expand)` }))] }));
|
|
417
424
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamingMarkdown.d.ts","sourceRoot":"","sources":["../../../src/components/StreamingMarkdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmDzB,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,QAAgB,GACjB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"StreamingMarkdown.d.ts","sourceRoot":"","sources":["../../../src/components/StreamingMarkdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmDzB,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,QAAgB,GACjB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,KAAK,CAAC,SAAS,CAmDlB"}
|