@oh-my-pi/pi-coding-agent 1.337.0

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.
Files changed (224) hide show
  1. package/CHANGELOG.md +1228 -0
  2. package/README.md +1041 -0
  3. package/docs/compaction.md +403 -0
  4. package/docs/custom-tools.md +541 -0
  5. package/docs/extension-loading.md +1004 -0
  6. package/docs/hooks.md +867 -0
  7. package/docs/rpc.md +1040 -0
  8. package/docs/sdk.md +994 -0
  9. package/docs/session-tree-plan.md +441 -0
  10. package/docs/session.md +240 -0
  11. package/docs/skills.md +290 -0
  12. package/docs/theme.md +637 -0
  13. package/docs/tree.md +197 -0
  14. package/docs/tui.md +341 -0
  15. package/examples/README.md +21 -0
  16. package/examples/custom-tools/README.md +124 -0
  17. package/examples/custom-tools/hello/index.ts +20 -0
  18. package/examples/custom-tools/question/index.ts +84 -0
  19. package/examples/custom-tools/subagent/README.md +172 -0
  20. package/examples/custom-tools/subagent/agents/planner.md +37 -0
  21. package/examples/custom-tools/subagent/agents/reviewer.md +35 -0
  22. package/examples/custom-tools/subagent/agents/scout.md +50 -0
  23. package/examples/custom-tools/subagent/agents/worker.md +24 -0
  24. package/examples/custom-tools/subagent/agents.ts +156 -0
  25. package/examples/custom-tools/subagent/commands/implement-and-review.md +10 -0
  26. package/examples/custom-tools/subagent/commands/implement.md +10 -0
  27. package/examples/custom-tools/subagent/commands/scout-and-plan.md +9 -0
  28. package/examples/custom-tools/subagent/index.ts +1002 -0
  29. package/examples/custom-tools/todo/index.ts +212 -0
  30. package/examples/hooks/README.md +56 -0
  31. package/examples/hooks/auto-commit-on-exit.ts +49 -0
  32. package/examples/hooks/confirm-destructive.ts +59 -0
  33. package/examples/hooks/custom-compaction.ts +116 -0
  34. package/examples/hooks/dirty-repo-guard.ts +52 -0
  35. package/examples/hooks/file-trigger.ts +41 -0
  36. package/examples/hooks/git-checkpoint.ts +53 -0
  37. package/examples/hooks/handoff.ts +150 -0
  38. package/examples/hooks/permission-gate.ts +34 -0
  39. package/examples/hooks/protected-paths.ts +30 -0
  40. package/examples/hooks/qna.ts +119 -0
  41. package/examples/hooks/snake.ts +343 -0
  42. package/examples/hooks/status-line.ts +40 -0
  43. package/examples/sdk/01-minimal.ts +22 -0
  44. package/examples/sdk/02-custom-model.ts +49 -0
  45. package/examples/sdk/03-custom-prompt.ts +44 -0
  46. package/examples/sdk/04-skills.ts +44 -0
  47. package/examples/sdk/05-tools.ts +90 -0
  48. package/examples/sdk/06-hooks.ts +61 -0
  49. package/examples/sdk/07-context-files.ts +36 -0
  50. package/examples/sdk/08-slash-commands.ts +42 -0
  51. package/examples/sdk/09-api-keys-and-oauth.ts +55 -0
  52. package/examples/sdk/10-settings.ts +38 -0
  53. package/examples/sdk/11-sessions.ts +48 -0
  54. package/examples/sdk/12-full-control.ts +95 -0
  55. package/examples/sdk/README.md +154 -0
  56. package/package.json +81 -0
  57. package/src/cli/args.ts +246 -0
  58. package/src/cli/file-processor.ts +72 -0
  59. package/src/cli/list-models.ts +104 -0
  60. package/src/cli/plugin-cli.ts +650 -0
  61. package/src/cli/session-picker.ts +41 -0
  62. package/src/cli.ts +10 -0
  63. package/src/commands/init.md +20 -0
  64. package/src/config.ts +159 -0
  65. package/src/core/agent-session.ts +1900 -0
  66. package/src/core/auth-storage.ts +236 -0
  67. package/src/core/bash-executor.ts +196 -0
  68. package/src/core/compaction/branch-summarization.ts +343 -0
  69. package/src/core/compaction/compaction.ts +742 -0
  70. package/src/core/compaction/index.ts +7 -0
  71. package/src/core/compaction/utils.ts +154 -0
  72. package/src/core/custom-tools/index.ts +21 -0
  73. package/src/core/custom-tools/loader.ts +248 -0
  74. package/src/core/custom-tools/types.ts +169 -0
  75. package/src/core/custom-tools/wrapper.ts +28 -0
  76. package/src/core/exec.ts +129 -0
  77. package/src/core/export-html/index.ts +211 -0
  78. package/src/core/export-html/template.css +781 -0
  79. package/src/core/export-html/template.html +54 -0
  80. package/src/core/export-html/template.js +1185 -0
  81. package/src/core/export-html/vendor/highlight.min.js +1213 -0
  82. package/src/core/export-html/vendor/marked.min.js +6 -0
  83. package/src/core/hooks/index.ts +16 -0
  84. package/src/core/hooks/loader.ts +312 -0
  85. package/src/core/hooks/runner.ts +434 -0
  86. package/src/core/hooks/tool-wrapper.ts +99 -0
  87. package/src/core/hooks/types.ts +773 -0
  88. package/src/core/index.ts +52 -0
  89. package/src/core/mcp/client.ts +158 -0
  90. package/src/core/mcp/config.ts +154 -0
  91. package/src/core/mcp/index.ts +45 -0
  92. package/src/core/mcp/loader.ts +68 -0
  93. package/src/core/mcp/manager.ts +181 -0
  94. package/src/core/mcp/tool-bridge.ts +148 -0
  95. package/src/core/mcp/transports/http.ts +316 -0
  96. package/src/core/mcp/transports/index.ts +6 -0
  97. package/src/core/mcp/transports/stdio.ts +252 -0
  98. package/src/core/mcp/types.ts +220 -0
  99. package/src/core/messages.ts +189 -0
  100. package/src/core/model-registry.ts +317 -0
  101. package/src/core/model-resolver.ts +393 -0
  102. package/src/core/plugins/doctor.ts +59 -0
  103. package/src/core/plugins/index.ts +38 -0
  104. package/src/core/plugins/installer.ts +189 -0
  105. package/src/core/plugins/loader.ts +338 -0
  106. package/src/core/plugins/manager.ts +672 -0
  107. package/src/core/plugins/parser.ts +105 -0
  108. package/src/core/plugins/paths.ts +32 -0
  109. package/src/core/plugins/types.ts +190 -0
  110. package/src/core/sdk.ts +760 -0
  111. package/src/core/session-manager.ts +1128 -0
  112. package/src/core/settings-manager.ts +443 -0
  113. package/src/core/skills.ts +437 -0
  114. package/src/core/slash-commands.ts +248 -0
  115. package/src/core/system-prompt.ts +439 -0
  116. package/src/core/timings.ts +25 -0
  117. package/src/core/tools/ask.ts +211 -0
  118. package/src/core/tools/bash-interceptor.ts +120 -0
  119. package/src/core/tools/bash.ts +250 -0
  120. package/src/core/tools/context.ts +32 -0
  121. package/src/core/tools/edit-diff.ts +475 -0
  122. package/src/core/tools/edit.ts +208 -0
  123. package/src/core/tools/exa/company.ts +59 -0
  124. package/src/core/tools/exa/index.ts +64 -0
  125. package/src/core/tools/exa/linkedin.ts +59 -0
  126. package/src/core/tools/exa/logger.ts +56 -0
  127. package/src/core/tools/exa/mcp-client.ts +368 -0
  128. package/src/core/tools/exa/render.ts +196 -0
  129. package/src/core/tools/exa/researcher.ts +90 -0
  130. package/src/core/tools/exa/search.ts +337 -0
  131. package/src/core/tools/exa/types.ts +168 -0
  132. package/src/core/tools/exa/websets.ts +248 -0
  133. package/src/core/tools/find.ts +261 -0
  134. package/src/core/tools/grep.ts +555 -0
  135. package/src/core/tools/index.ts +202 -0
  136. package/src/core/tools/ls.ts +140 -0
  137. package/src/core/tools/lsp/client.ts +605 -0
  138. package/src/core/tools/lsp/config.ts +147 -0
  139. package/src/core/tools/lsp/edits.ts +101 -0
  140. package/src/core/tools/lsp/index.ts +804 -0
  141. package/src/core/tools/lsp/render.ts +447 -0
  142. package/src/core/tools/lsp/rust-analyzer.ts +145 -0
  143. package/src/core/tools/lsp/types.ts +463 -0
  144. package/src/core/tools/lsp/utils.ts +486 -0
  145. package/src/core/tools/notebook.ts +229 -0
  146. package/src/core/tools/path-utils.ts +61 -0
  147. package/src/core/tools/read.ts +240 -0
  148. package/src/core/tools/renderers.ts +540 -0
  149. package/src/core/tools/task/agents.ts +153 -0
  150. package/src/core/tools/task/artifacts.ts +114 -0
  151. package/src/core/tools/task/bundled-agents/browser.md +71 -0
  152. package/src/core/tools/task/bundled-agents/explore.md +82 -0
  153. package/src/core/tools/task/bundled-agents/plan.md +54 -0
  154. package/src/core/tools/task/bundled-agents/reviewer.md +59 -0
  155. package/src/core/tools/task/bundled-agents/task.md +53 -0
  156. package/src/core/tools/task/bundled-commands/architect-plan.md +10 -0
  157. package/src/core/tools/task/bundled-commands/implement-with-critic.md +11 -0
  158. package/src/core/tools/task/bundled-commands/implement.md +11 -0
  159. package/src/core/tools/task/commands.ts +213 -0
  160. package/src/core/tools/task/discovery.ts +208 -0
  161. package/src/core/tools/task/executor.ts +367 -0
  162. package/src/core/tools/task/index.ts +388 -0
  163. package/src/core/tools/task/model-resolver.ts +115 -0
  164. package/src/core/tools/task/parallel.ts +38 -0
  165. package/src/core/tools/task/render.ts +232 -0
  166. package/src/core/tools/task/types.ts +99 -0
  167. package/src/core/tools/truncate.ts +265 -0
  168. package/src/core/tools/web-fetch.ts +2370 -0
  169. package/src/core/tools/web-search/auth.ts +193 -0
  170. package/src/core/tools/web-search/index.ts +537 -0
  171. package/src/core/tools/web-search/providers/anthropic.ts +198 -0
  172. package/src/core/tools/web-search/providers/exa.ts +302 -0
  173. package/src/core/tools/web-search/providers/perplexity.ts +195 -0
  174. package/src/core/tools/web-search/render.ts +182 -0
  175. package/src/core/tools/web-search/types.ts +180 -0
  176. package/src/core/tools/write.ts +99 -0
  177. package/src/index.ts +176 -0
  178. package/src/main.ts +464 -0
  179. package/src/migrations.ts +135 -0
  180. package/src/modes/index.ts +43 -0
  181. package/src/modes/interactive/components/armin.ts +382 -0
  182. package/src/modes/interactive/components/assistant-message.ts +86 -0
  183. package/src/modes/interactive/components/bash-execution.ts +196 -0
  184. package/src/modes/interactive/components/bordered-loader.ts +41 -0
  185. package/src/modes/interactive/components/branch-summary-message.ts +42 -0
  186. package/src/modes/interactive/components/compaction-summary-message.ts +45 -0
  187. package/src/modes/interactive/components/custom-editor.ts +122 -0
  188. package/src/modes/interactive/components/diff.ts +147 -0
  189. package/src/modes/interactive/components/dynamic-border.ts +25 -0
  190. package/src/modes/interactive/components/footer.ts +381 -0
  191. package/src/modes/interactive/components/hook-editor.ts +117 -0
  192. package/src/modes/interactive/components/hook-input.ts +64 -0
  193. package/src/modes/interactive/components/hook-message.ts +96 -0
  194. package/src/modes/interactive/components/hook-selector.ts +91 -0
  195. package/src/modes/interactive/components/model-selector.ts +247 -0
  196. package/src/modes/interactive/components/oauth-selector.ts +120 -0
  197. package/src/modes/interactive/components/plugin-settings.ts +479 -0
  198. package/src/modes/interactive/components/queue-mode-selector.ts +56 -0
  199. package/src/modes/interactive/components/session-selector.ts +204 -0
  200. package/src/modes/interactive/components/settings-selector.ts +453 -0
  201. package/src/modes/interactive/components/show-images-selector.ts +45 -0
  202. package/src/modes/interactive/components/theme-selector.ts +62 -0
  203. package/src/modes/interactive/components/thinking-selector.ts +64 -0
  204. package/src/modes/interactive/components/tool-execution.ts +675 -0
  205. package/src/modes/interactive/components/tree-selector.ts +866 -0
  206. package/src/modes/interactive/components/user-message-selector.ts +159 -0
  207. package/src/modes/interactive/components/user-message.ts +18 -0
  208. package/src/modes/interactive/components/visual-truncate.ts +50 -0
  209. package/src/modes/interactive/components/welcome.ts +183 -0
  210. package/src/modes/interactive/interactive-mode.ts +2516 -0
  211. package/src/modes/interactive/theme/dark.json +101 -0
  212. package/src/modes/interactive/theme/light.json +98 -0
  213. package/src/modes/interactive/theme/theme-schema.json +308 -0
  214. package/src/modes/interactive/theme/theme.ts +998 -0
  215. package/src/modes/print-mode.ts +128 -0
  216. package/src/modes/rpc/rpc-client.ts +527 -0
  217. package/src/modes/rpc/rpc-mode.ts +483 -0
  218. package/src/modes/rpc/rpc-types.ts +203 -0
  219. package/src/utils/changelog.ts +99 -0
  220. package/src/utils/clipboard.ts +265 -0
  221. package/src/utils/fuzzy.ts +108 -0
  222. package/src/utils/mime.ts +30 -0
  223. package/src/utils/shell.ts +276 -0
  224. package/src/utils/tools-manager.ts +274 -0
@@ -0,0 +1,781 @@
1
+ :root {
2
+ {{THEME_VARS}}
3
+ --body-bg: {{BODY_BG}};
4
+ --container-bg: {{CONTAINER_BG}};
5
+ --info-bg: {{INFO_BG}};
6
+ }
7
+
8
+ * { margin: 0; padding: 0; box-sizing: border-box; }
9
+
10
+ :root {
11
+ --line-height: 18px; /* 12px font * 1.5 */
12
+ }
13
+
14
+ body {
15
+ font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
16
+ font-size: 12px;
17
+ line-height: var(--line-height);
18
+ color: var(--text);
19
+ background: var(--body-bg);
20
+ }
21
+
22
+ #app {
23
+ display: flex;
24
+ min-height: 100vh;
25
+ }
26
+
27
+ /* Sidebar */
28
+ #sidebar {
29
+ width: 400px;
30
+ background: var(--container-bg);
31
+ flex-shrink: 0;
32
+ display: flex;
33
+ flex-direction: column;
34
+ position: sticky;
35
+ top: 0;
36
+ height: 100vh;
37
+ border-right: 1px solid var(--dim);
38
+ }
39
+
40
+ .sidebar-header {
41
+ padding: 8px 12px;
42
+ flex-shrink: 0;
43
+ }
44
+
45
+ .sidebar-controls {
46
+ padding: 8px 8px 4px 8px;
47
+ }
48
+
49
+ .sidebar-search {
50
+ width: 100%;
51
+ box-sizing: border-box;
52
+ padding: 4px 8px;
53
+ font-size: 11px;
54
+ font-family: inherit;
55
+ background: var(--body-bg);
56
+ color: var(--text);
57
+ border: 1px solid var(--dim);
58
+ border-radius: 3px;
59
+ }
60
+
61
+ .sidebar-filters {
62
+ display: flex;
63
+ padding: 4px 8px 8px 8px;
64
+ gap: 4px;
65
+ align-items: center;
66
+ flex-wrap: wrap;
67
+ }
68
+
69
+ .sidebar-search:focus {
70
+ outline: none;
71
+ border-color: var(--accent);
72
+ }
73
+
74
+ .sidebar-search::placeholder {
75
+ color: var(--muted);
76
+ }
77
+
78
+ .filter-btn {
79
+ padding: 3px 8px;
80
+ font-size: 10px;
81
+ font-family: inherit;
82
+ background: transparent;
83
+ color: var(--muted);
84
+ border: 1px solid var(--dim);
85
+ border-radius: 3px;
86
+ cursor: pointer;
87
+ }
88
+
89
+ .filter-btn:hover {
90
+ color: var(--text);
91
+ border-color: var(--text);
92
+ }
93
+
94
+ .filter-btn.active {
95
+ background: var(--accent);
96
+ color: var(--body-bg);
97
+ border-color: var(--accent);
98
+ }
99
+
100
+ .sidebar-close {
101
+ display: none;
102
+ padding: 3px 8px;
103
+ font-size: 12px;
104
+ font-family: inherit;
105
+ background: transparent;
106
+ color: var(--muted);
107
+ border: 1px solid var(--dim);
108
+ border-radius: 3px;
109
+ cursor: pointer;
110
+ margin-left: auto;
111
+ }
112
+
113
+ .sidebar-close:hover {
114
+ color: var(--text);
115
+ border-color: var(--text);
116
+ }
117
+
118
+ .tree-container {
119
+ flex: 1;
120
+ overflow: auto;
121
+ padding: 4px 0;
122
+ }
123
+
124
+ .tree-node {
125
+ padding: 0 8px;
126
+ cursor: pointer;
127
+ display: flex;
128
+ align-items: baseline;
129
+ font-size: 11px;
130
+ line-height: 13px;
131
+ white-space: nowrap;
132
+ }
133
+
134
+ .tree-node:hover {
135
+ background: var(--selectedBg);
136
+ }
137
+
138
+ .tree-node.active {
139
+ background: var(--selectedBg);
140
+ }
141
+
142
+ .tree-node.active .tree-content {
143
+ font-weight: bold;
144
+ }
145
+
146
+ .tree-node.in-path {
147
+ }
148
+
149
+ .tree-prefix {
150
+ color: var(--muted);
151
+ flex-shrink: 0;
152
+ font-family: monospace;
153
+ white-space: pre;
154
+ }
155
+
156
+ .tree-marker {
157
+ color: var(--accent);
158
+ flex-shrink: 0;
159
+ }
160
+
161
+ .tree-content {
162
+ color: var(--text);
163
+ }
164
+
165
+ .tree-role-user {
166
+ color: var(--accent);
167
+ }
168
+
169
+ .tree-role-assistant {
170
+ color: var(--success);
171
+ }
172
+
173
+ .tree-role-tool {
174
+ color: var(--muted);
175
+ }
176
+
177
+ .tree-muted {
178
+ color: var(--muted);
179
+ }
180
+
181
+ .tree-error {
182
+ color: var(--error);
183
+ }
184
+
185
+ .tree-compaction {
186
+ color: var(--borderAccent);
187
+ }
188
+
189
+ .tree-branch-summary {
190
+ color: var(--warning);
191
+ }
192
+
193
+ .tree-custom-message {
194
+ color: var(--customMessageLabel);
195
+ }
196
+
197
+ .tree-status {
198
+ padding: 4px 12px;
199
+ font-size: 10px;
200
+ color: var(--muted);
201
+ flex-shrink: 0;
202
+ }
203
+
204
+ /* Main content */
205
+ #content {
206
+ flex: 1;
207
+ overflow-y: auto;
208
+ padding: var(--line-height) calc(var(--line-height) * 2);
209
+ display: flex;
210
+ flex-direction: column;
211
+ align-items: center;
212
+ }
213
+
214
+ #content > * {
215
+ width: 100%;
216
+ max-width: 800px;
217
+ }
218
+
219
+ /* Help bar */
220
+ .help-bar {
221
+ font-size: 11px;
222
+ color: var(--warning);
223
+ margin-bottom: var(--line-height);
224
+ }
225
+
226
+ /* Header */
227
+ .header {
228
+ background: var(--container-bg);
229
+ border-radius: 4px;
230
+ padding: var(--line-height);
231
+ margin-bottom: var(--line-height);
232
+ }
233
+
234
+ .header h1 {
235
+ font-size: 12px;
236
+ font-weight: bold;
237
+ color: var(--borderAccent);
238
+ margin-bottom: var(--line-height);
239
+ }
240
+
241
+ .header-info {
242
+ display: flex;
243
+ flex-direction: column;
244
+ gap: 0;
245
+ font-size: 11px;
246
+ }
247
+
248
+ .info-item {
249
+ color: var(--dim);
250
+ display: flex;
251
+ align-items: baseline;
252
+ }
253
+
254
+ .info-label {
255
+ font-weight: 600;
256
+ margin-right: 8px;
257
+ min-width: 100px;
258
+ }
259
+
260
+ .info-value {
261
+ color: var(--text);
262
+ flex: 1;
263
+ }
264
+
265
+ /* Messages */
266
+ #messages {
267
+ display: flex;
268
+ flex-direction: column;
269
+ gap: var(--line-height);
270
+ }
271
+
272
+ .message-timestamp {
273
+ font-size: 10px;
274
+ color: var(--dim);
275
+ opacity: 0.8;
276
+ }
277
+
278
+ .user-message {
279
+ background: var(--userMessageBg);
280
+ color: var(--userMessageText);
281
+ padding: var(--line-height);
282
+ border-radius: 4px;
283
+ }
284
+
285
+ .assistant-message {
286
+ padding: 0;
287
+ }
288
+
289
+ .assistant-message > .message-timestamp {
290
+ padding-left: var(--line-height);
291
+ }
292
+
293
+ .assistant-text {
294
+ padding: var(--line-height);
295
+ padding-bottom: 0;
296
+ }
297
+
298
+ .message-timestamp + .assistant-text,
299
+ .message-timestamp + .thinking-block {
300
+ padding-top: 0;
301
+ }
302
+
303
+ .thinking-block + .assistant-text {
304
+ padding-top: 0;
305
+ }
306
+
307
+ .thinking-text {
308
+ padding: var(--line-height);
309
+ color: var(--thinkingText);
310
+ font-style: italic;
311
+ white-space: pre-wrap;
312
+ }
313
+
314
+ .message-timestamp + .thinking-block .thinking-text,
315
+ .message-timestamp + .thinking-block .thinking-collapsed {
316
+ padding-top: 0;
317
+ }
318
+
319
+ .thinking-collapsed {
320
+ display: none;
321
+ padding: var(--line-height);
322
+ color: var(--thinkingText);
323
+ font-style: italic;
324
+ }
325
+
326
+ /* Tool execution */
327
+ .tool-execution {
328
+ padding: var(--line-height);
329
+ border-radius: 4px;
330
+ }
331
+
332
+ .tool-execution + .tool-execution {
333
+ margin-top: var(--line-height);
334
+ }
335
+
336
+ .tool-execution.pending { background: var(--toolPendingBg); }
337
+ .tool-execution.success { background: var(--toolSuccessBg); }
338
+ .tool-execution.error { background: var(--toolErrorBg); }
339
+
340
+ .tool-header, .tool-name {
341
+ font-weight: bold;
342
+ }
343
+
344
+ .tool-path {
345
+ color: var(--accent);
346
+ word-break: break-all;
347
+ }
348
+
349
+ .line-numbers {
350
+ color: var(--warning);
351
+ }
352
+
353
+ .line-count {
354
+ color: var(--dim);
355
+ }
356
+
357
+ .tool-command {
358
+ font-weight: bold;
359
+ white-space: pre-wrap;
360
+ word-wrap: break-word;
361
+ overflow-wrap: break-word;
362
+ word-break: break-word;
363
+ }
364
+
365
+ .tool-output {
366
+ margin-top: var(--line-height);
367
+ color: var(--toolOutput);
368
+ word-wrap: break-word;
369
+ overflow-wrap: break-word;
370
+ word-break: break-word;
371
+ font-family: inherit;
372
+ overflow-x: auto;
373
+ }
374
+
375
+ .tool-output > div,
376
+ .output-preview,
377
+ .output-full {
378
+ margin: 0;
379
+ padding: 0;
380
+ line-height: var(--line-height);
381
+ }
382
+
383
+ .tool-output pre {
384
+ margin: 0;
385
+ padding: 0;
386
+ font-family: inherit;
387
+ color: inherit;
388
+ white-space: pre-wrap;
389
+ word-wrap: break-word;
390
+ overflow-wrap: break-word;
391
+ }
392
+
393
+ .tool-output code {
394
+ padding: 0;
395
+ background: none;
396
+ color: var(--text);
397
+ }
398
+
399
+ .tool-output.expandable {
400
+ cursor: pointer;
401
+ }
402
+
403
+ .tool-output.expandable:hover {
404
+ opacity: 0.9;
405
+ }
406
+
407
+ .tool-output.expandable .output-full {
408
+ display: none;
409
+ }
410
+
411
+ .tool-output.expandable.expanded .output-preview {
412
+ display: none;
413
+ }
414
+
415
+ .tool-output.expandable.expanded .output-full {
416
+ display: block;
417
+ }
418
+
419
+ .tool-images {
420
+ }
421
+
422
+ .tool-image {
423
+ max-width: 100%;
424
+ max-height: 500px;
425
+ border-radius: 4px;
426
+ margin: var(--line-height) 0;
427
+ }
428
+
429
+ .expand-hint {
430
+ color: var(--toolOutput);
431
+ }
432
+
433
+ /* Diff */
434
+ .tool-diff {
435
+ font-size: 11px;
436
+ overflow-x: auto;
437
+ white-space: pre;
438
+ }
439
+
440
+ .diff-added { color: var(--toolDiffAdded); }
441
+ .diff-removed { color: var(--toolDiffRemoved); }
442
+ .diff-context { color: var(--toolDiffContext); }
443
+
444
+ /* Model change */
445
+ .model-change {
446
+ padding: 0 var(--line-height);
447
+ color: var(--dim);
448
+ font-size: 11px;
449
+ }
450
+
451
+ .model-name {
452
+ color: var(--borderAccent);
453
+ font-weight: bold;
454
+ }
455
+
456
+ /* Compaction / Branch Summary - matches customMessage colors from TUI */
457
+ .compaction {
458
+ background: var(--customMessageBg);
459
+ border-radius: 4px;
460
+ padding: var(--line-height);
461
+ cursor: pointer;
462
+ }
463
+
464
+ .compaction-label {
465
+ color: var(--customMessageLabel);
466
+ font-weight: bold;
467
+ }
468
+
469
+ .compaction-collapsed {
470
+ color: var(--customMessageText);
471
+ }
472
+
473
+ .compaction-content {
474
+ display: none;
475
+ color: var(--customMessageText);
476
+ white-space: pre-wrap;
477
+ margin-top: var(--line-height);
478
+ }
479
+
480
+ .compaction.expanded .compaction-collapsed {
481
+ display: none;
482
+ }
483
+
484
+ .compaction.expanded .compaction-content {
485
+ display: block;
486
+ }
487
+
488
+ /* System prompt */
489
+ .system-prompt {
490
+ background: var(--customMessageBg);
491
+ padding: var(--line-height);
492
+ border-radius: 4px;
493
+ margin-bottom: var(--line-height);
494
+ }
495
+
496
+ .system-prompt-header {
497
+ font-weight: bold;
498
+ color: var(--customMessageLabel);
499
+ }
500
+
501
+ .system-prompt-content {
502
+ color: var(--customMessageText);
503
+ white-space: pre-wrap;
504
+ word-wrap: break-word;
505
+ font-size: 11px;
506
+ max-height: 200px;
507
+ overflow-y: auto;
508
+ margin-top: var(--line-height);
509
+ }
510
+
511
+ /* Tools list */
512
+ .tools-list {
513
+ background: var(--customMessageBg);
514
+ padding: var(--line-height);
515
+ border-radius: 4px;
516
+ margin-bottom: var(--line-height);
517
+ }
518
+
519
+ .tools-header {
520
+ font-weight: bold;
521
+ color: var(--warning);
522
+ margin-bottom: var(--line-height);
523
+ }
524
+
525
+ .tool-item {
526
+ font-size: 11px;
527
+ }
528
+
529
+ .tool-item-name {
530
+ font-weight: bold;
531
+ color: var(--text);
532
+ }
533
+
534
+ .tool-item-desc {
535
+ color: var(--dim);
536
+ }
537
+
538
+ /* Hook/custom messages */
539
+ .hook-message {
540
+ background: var(--customMessageBg);
541
+ color: var(--customMessageText);
542
+ padding: var(--line-height);
543
+ border-radius: 4px;
544
+ }
545
+
546
+ .hook-type {
547
+ color: var(--customMessageLabel);
548
+ font-weight: bold;
549
+ }
550
+
551
+ /* Branch summary */
552
+ .branch-summary {
553
+ background: var(--customMessageBg);
554
+ padding: var(--line-height);
555
+ border-radius: 4px;
556
+ }
557
+
558
+ .branch-summary-header {
559
+ font-weight: bold;
560
+ color: var(--borderAccent);
561
+ }
562
+
563
+ /* Error */
564
+ .error-text {
565
+ color: var(--error);
566
+ padding: 0 var(--line-height);
567
+ }
568
+
569
+ /* Images */
570
+ .message-images {
571
+ margin-bottom: 12px;
572
+ }
573
+
574
+ .message-image {
575
+ max-width: 100%;
576
+ max-height: 400px;
577
+ border-radius: 4px;
578
+ margin: var(--line-height) 0;
579
+ }
580
+
581
+ /* Markdown content */
582
+ .markdown-content h1,
583
+ .markdown-content h2,
584
+ .markdown-content h3,
585
+ .markdown-content h4,
586
+ .markdown-content h5,
587
+ .markdown-content h6 {
588
+ color: var(--mdHeading);
589
+ margin: var(--line-height) 0 0 0;
590
+ font-weight: bold;
591
+ }
592
+
593
+ .markdown-content h1 { font-size: 1em; }
594
+ .markdown-content h2 { font-size: 1em; }
595
+ .markdown-content h3 { font-size: 1em; }
596
+ .markdown-content h4 { font-size: 1em; }
597
+ .markdown-content h5 { font-size: 1em; }
598
+ .markdown-content h6 { font-size: 1em; }
599
+ .markdown-content p { margin: 0; }
600
+ .markdown-content p + p { margin-top: var(--line-height); }
601
+
602
+ .markdown-content a {
603
+ color: var(--mdLink);
604
+ text-decoration: underline;
605
+ }
606
+
607
+ .markdown-content code {
608
+ background: rgba(128, 128, 128, 0.2);
609
+ color: var(--mdCode);
610
+ padding: 0 4px;
611
+ border-radius: 3px;
612
+ font-family: inherit;
613
+ }
614
+
615
+ .markdown-content pre {
616
+ background: transparent;
617
+ margin: var(--line-height) 0;
618
+ overflow-x: auto;
619
+ }
620
+
621
+ .markdown-content pre code {
622
+ display: block;
623
+ background: none;
624
+ color: var(--text);
625
+ }
626
+
627
+ .markdown-content blockquote {
628
+ border-left: 3px solid var(--mdQuoteBorder);
629
+ padding-left: var(--line-height);
630
+ margin: var(--line-height) 0;
631
+ color: var(--mdQuote);
632
+ font-style: italic;
633
+ }
634
+
635
+ .markdown-content ul,
636
+ .markdown-content ol {
637
+ margin: var(--line-height) 0;
638
+ padding-left: calc(var(--line-height) * 2);
639
+ }
640
+
641
+ .markdown-content li { margin: 0; }
642
+ .markdown-content li::marker { color: var(--mdListBullet); }
643
+
644
+ .markdown-content hr {
645
+ border: none;
646
+ border-top: 1px solid var(--mdHr);
647
+ margin: var(--line-height) 0;
648
+ }
649
+
650
+ .markdown-content table {
651
+ border-collapse: collapse;
652
+ margin: 0.5em 0;
653
+ width: 100%;
654
+ }
655
+
656
+ .markdown-content th,
657
+ .markdown-content td {
658
+ border: 1px solid var(--mdCodeBlockBorder);
659
+ padding: 6px 10px;
660
+ text-align: left;
661
+ }
662
+
663
+ .markdown-content th {
664
+ background: rgba(128, 128, 128, 0.1);
665
+ font-weight: bold;
666
+ }
667
+
668
+ .markdown-content img {
669
+ max-width: 100%;
670
+ border-radius: 4px;
671
+ }
672
+
673
+ /* Syntax highlighting */
674
+ .hljs { background: transparent; color: var(--text); }
675
+ .hljs-comment, .hljs-quote { color: var(--syntaxComment); }
676
+ .hljs-keyword, .hljs-selector-tag { color: var(--syntaxKeyword); }
677
+ .hljs-number, .hljs-literal { color: var(--syntaxNumber); }
678
+ .hljs-string, .hljs-doctag { color: var(--syntaxString); }
679
+ /* Function names: hljs v11 uses .hljs-title.function_ compound class */
680
+ .hljs-function, .hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: var(--syntaxFunction); }
681
+ /* Types: hljs v11 uses .hljs-title.class_ for class names */
682
+ .hljs-type, .hljs-class, .hljs-title.class_, .hljs-built_in { color: var(--syntaxType); }
683
+ .hljs-attr, .hljs-variable, .hljs-variable.language_, .hljs-params, .hljs-property { color: var(--syntaxVariable); }
684
+ .hljs-meta, .hljs-meta .hljs-keyword, .hljs-meta .hljs-string { color: var(--syntaxKeyword); }
685
+ .hljs-operator { color: var(--syntaxOperator); }
686
+ .hljs-punctuation { color: var(--syntaxPunctuation); }
687
+ .hljs-subst { color: var(--text); }
688
+
689
+ /* Footer */
690
+ .footer {
691
+ margin-top: 48px;
692
+ padding: 20px;
693
+ text-align: center;
694
+ color: var(--dim);
695
+ font-size: 10px;
696
+ }
697
+
698
+ /* Mobile */
699
+ #hamburger {
700
+ display: none;
701
+ position: fixed;
702
+ top: 10px;
703
+ left: 10px;
704
+ z-index: 100;
705
+ padding: 3px 8px;
706
+ font-size: 12px;
707
+ font-family: inherit;
708
+ background: transparent;
709
+ color: var(--muted);
710
+ border: 1px solid var(--dim);
711
+ border-radius: 3px;
712
+ cursor: pointer;
713
+ }
714
+
715
+ #hamburger:hover {
716
+ color: var(--text);
717
+ border-color: var(--text);
718
+ }
719
+
720
+
721
+
722
+ #sidebar-overlay {
723
+ display: none;
724
+ position: fixed;
725
+ top: 0;
726
+ left: 0;
727
+ right: 0;
728
+ bottom: 0;
729
+ background: rgba(0, 0, 0, 0.5);
730
+ z-index: 98;
731
+ }
732
+
733
+ @media (max-width: 900px) {
734
+ #sidebar {
735
+ position: fixed;
736
+ left: -400px;
737
+ width: 400px;
738
+ top: 0;
739
+ bottom: 0;
740
+ height: 100vh;
741
+ z-index: 99;
742
+ transition: left 0.3s;
743
+ }
744
+
745
+ #sidebar.open {
746
+ left: 0;
747
+ }
748
+
749
+ #sidebar-overlay.open {
750
+ display: block;
751
+ }
752
+
753
+ #hamburger {
754
+ display: block;
755
+ }
756
+
757
+ .sidebar-close {
758
+ display: block;
759
+ }
760
+
761
+ #content {
762
+ padding: var(--line-height) 16px;
763
+ }
764
+
765
+ #content > * {
766
+ max-width: 100%;
767
+ }
768
+ }
769
+
770
+ @media (max-width: 500px) {
771
+ #sidebar {
772
+ width: 100vw;
773
+ left: -100vw;
774
+ }
775
+ }
776
+
777
+ @media print {
778
+ #sidebar, #sidebar-toggle { display: none !important; }
779
+ body { background: white; color: black; }
780
+ #content { max-width: none; }
781
+ }