@mariozechner/pi-coding-agent 0.30.1 → 0.31.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 (301) hide show
  1. package/CHANGELOG.md +251 -2
  2. package/README.md +105 -84
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +5 -1
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/cli/file-processor.d.ts +3 -3
  7. package/dist/cli/file-processor.d.ts.map +1 -1
  8. package/dist/cli/file-processor.js +7 -10
  9. package/dist/cli/file-processor.js.map +1 -1
  10. package/dist/config.d.ts +9 -0
  11. package/dist/config.d.ts.map +1 -1
  12. package/dist/config.js +18 -0
  13. package/dist/config.js.map +1 -1
  14. package/dist/core/agent-session.d.ts +73 -34
  15. package/dist/core/agent-session.d.ts.map +1 -1
  16. package/dist/core/agent-session.js +464 -210
  17. package/dist/core/agent-session.js.map +1 -1
  18. package/dist/core/auth-storage.d.ts +2 -7
  19. package/dist/core/auth-storage.d.ts.map +1 -1
  20. package/dist/core/auth-storage.js +4 -52
  21. package/dist/core/auth-storage.js.map +1 -1
  22. package/dist/core/bash-executor.d.ts +2 -2
  23. package/dist/core/bash-executor.d.ts.map +1 -1
  24. package/dist/core/bash-executor.js +2 -2
  25. package/dist/core/bash-executor.js.map +1 -1
  26. package/dist/core/compaction/branch-summarization.d.ts +84 -0
  27. package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
  28. package/dist/core/compaction/branch-summarization.js +233 -0
  29. package/dist/core/compaction/branch-summarization.js.map +1 -0
  30. package/dist/core/{compaction.d.ts → compaction/compaction.d.ts} +38 -19
  31. package/dist/core/compaction/compaction.d.ts.map +1 -0
  32. package/dist/core/compaction/compaction.js +558 -0
  33. package/dist/core/compaction/compaction.js.map +1 -0
  34. package/dist/core/compaction/index.d.ts +7 -0
  35. package/dist/core/compaction/index.d.ts.map +1 -0
  36. package/dist/core/compaction/index.js +7 -0
  37. package/dist/core/compaction/index.js.map +1 -0
  38. package/dist/core/compaction/utils.d.ts +35 -0
  39. package/dist/core/compaction/utils.d.ts.map +1 -0
  40. package/dist/core/compaction/utils.js +138 -0
  41. package/dist/core/compaction/utils.js.map +1 -0
  42. package/dist/core/custom-tools/index.d.ts +2 -1
  43. package/dist/core/custom-tools/index.d.ts.map +1 -1
  44. package/dist/core/custom-tools/index.js +1 -0
  45. package/dist/core/custom-tools/index.js.map +1 -1
  46. package/dist/core/custom-tools/loader.d.ts.map +1 -1
  47. package/dist/core/custom-tools/loader.js +13 -80
  48. package/dist/core/custom-tools/loader.js.map +1 -1
  49. package/dist/core/custom-tools/types.d.ts +84 -59
  50. package/dist/core/custom-tools/types.d.ts.map +1 -1
  51. package/dist/core/custom-tools/types.js.map +1 -1
  52. package/dist/core/custom-tools/wrapper.d.ts +15 -0
  53. package/dist/core/custom-tools/wrapper.d.ts.map +1 -0
  54. package/dist/core/custom-tools/wrapper.js +23 -0
  55. package/dist/core/custom-tools/wrapper.js.map +1 -0
  56. package/dist/core/exec.d.ts +29 -0
  57. package/dist/core/exec.d.ts.map +1 -0
  58. package/dist/core/exec.js +71 -0
  59. package/dist/core/exec.js.map +1 -0
  60. package/dist/core/export-html/index.d.ts +17 -0
  61. package/dist/core/export-html/index.d.ts.map +1 -0
  62. package/dist/core/export-html/index.js +171 -0
  63. package/dist/core/export-html/index.js.map +1 -0
  64. package/dist/core/export-html/template.css +781 -0
  65. package/dist/core/export-html/template.html +54 -0
  66. package/dist/core/export-html/template.js +1185 -0
  67. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  68. package/dist/core/export-html/vendor/marked.min.js +6 -0
  69. package/dist/core/hooks/index.d.ts +4 -4
  70. package/dist/core/hooks/index.d.ts.map +1 -1
  71. package/dist/core/hooks/index.js +3 -3
  72. package/dist/core/hooks/index.js.map +1 -1
  73. package/dist/core/hooks/loader.d.ts +40 -5
  74. package/dist/core/hooks/loader.d.ts.map +1 -1
  75. package/dist/core/hooks/loader.js +43 -10
  76. package/dist/core/hooks/loader.js.map +1 -1
  77. package/dist/core/hooks/runner.d.ts +94 -18
  78. package/dist/core/hooks/runner.d.ts.map +1 -1
  79. package/dist/core/hooks/runner.js +199 -120
  80. package/dist/core/hooks/runner.js.map +1 -1
  81. package/dist/core/hooks/tool-wrapper.d.ts +1 -1
  82. package/dist/core/hooks/tool-wrapper.d.ts.map +1 -1
  83. package/dist/core/hooks/tool-wrapper.js +36 -19
  84. package/dist/core/hooks/tool-wrapper.js.map +1 -1
  85. package/dist/core/hooks/types.d.ts +407 -96
  86. package/dist/core/hooks/types.d.ts.map +1 -1
  87. package/dist/core/hooks/types.js.map +1 -1
  88. package/dist/core/index.d.ts +4 -3
  89. package/dist/core/index.d.ts.map +1 -1
  90. package/dist/core/index.js.map +1 -1
  91. package/dist/core/messages.d.ts +44 -12
  92. package/dist/core/messages.d.ts.map +1 -1
  93. package/dist/core/messages.js +82 -34
  94. package/dist/core/messages.js.map +1 -1
  95. package/dist/core/model-registry.d.ts +5 -5
  96. package/dist/core/model-registry.d.ts.map +1 -1
  97. package/dist/core/model-registry.js +7 -7
  98. package/dist/core/model-registry.js.map +1 -1
  99. package/dist/core/model-resolver.d.ts +7 -7
  100. package/dist/core/model-resolver.d.ts.map +1 -1
  101. package/dist/core/model-resolver.js +45 -14
  102. package/dist/core/model-resolver.js.map +1 -1
  103. package/dist/core/sdk.d.ts +7 -10
  104. package/dist/core/sdk.d.ts.map +1 -1
  105. package/dist/core/sdk.js +88 -32
  106. package/dist/core/sdk.js.map +1 -1
  107. package/dist/core/session-manager.d.ts +202 -36
  108. package/dist/core/session-manager.d.ts.map +1 -1
  109. package/dist/core/session-manager.js +565 -133
  110. package/dist/core/session-manager.js.map +1 -1
  111. package/dist/core/settings-manager.d.ts +9 -3
  112. package/dist/core/settings-manager.d.ts.map +1 -1
  113. package/dist/core/settings-manager.js +13 -12
  114. package/dist/core/settings-manager.js.map +1 -1
  115. package/dist/core/system-prompt.d.ts.map +1 -1
  116. package/dist/core/system-prompt.js +6 -3
  117. package/dist/core/system-prompt.js.map +1 -1
  118. package/dist/core/tools/bash.d.ts +1 -1
  119. package/dist/core/tools/bash.d.ts.map +1 -1
  120. package/dist/core/tools/bash.js.map +1 -1
  121. package/dist/core/tools/edit-diff.d.ts +33 -0
  122. package/dist/core/tools/edit-diff.d.ts.map +1 -0
  123. package/dist/core/tools/edit-diff.js +171 -0
  124. package/dist/core/tools/edit-diff.js.map +1 -0
  125. package/dist/core/tools/edit.d.ts +7 -1
  126. package/dist/core/tools/edit.d.ts.map +1 -1
  127. package/dist/core/tools/edit.js +20 -95
  128. package/dist/core/tools/edit.js.map +1 -1
  129. package/dist/core/tools/find.d.ts +1 -1
  130. package/dist/core/tools/find.d.ts.map +1 -1
  131. package/dist/core/tools/find.js.map +1 -1
  132. package/dist/core/tools/grep.d.ts +1 -1
  133. package/dist/core/tools/grep.d.ts.map +1 -1
  134. package/dist/core/tools/grep.js.map +1 -1
  135. package/dist/core/tools/index.d.ts +1 -1
  136. package/dist/core/tools/index.d.ts.map +1 -1
  137. package/dist/core/tools/index.js.map +1 -1
  138. package/dist/core/tools/ls.d.ts +1 -1
  139. package/dist/core/tools/ls.d.ts.map +1 -1
  140. package/dist/core/tools/ls.js.map +1 -1
  141. package/dist/core/tools/read.d.ts +1 -1
  142. package/dist/core/tools/read.d.ts.map +1 -1
  143. package/dist/core/tools/read.js.map +1 -1
  144. package/dist/core/tools/write.d.ts +1 -1
  145. package/dist/core/tools/write.d.ts.map +1 -1
  146. package/dist/core/tools/write.js.map +1 -1
  147. package/dist/index.d.ts +8 -7
  148. package/dist/index.d.ts.map +1 -1
  149. package/dist/index.js +5 -5
  150. package/dist/index.js.map +1 -1
  151. package/dist/main.d.ts.map +1 -1
  152. package/dist/main.js +25 -25
  153. package/dist/main.js.map +1 -1
  154. package/dist/migrations.d.ts +28 -0
  155. package/dist/migrations.d.ts.map +1 -0
  156. package/dist/migrations.js +125 -0
  157. package/dist/migrations.js.map +1 -0
  158. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  159. package/dist/modes/interactive/components/assistant-message.js +3 -4
  160. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  161. package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
  162. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  163. package/dist/modes/interactive/components/bash-execution.js +6 -2
  164. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  165. package/dist/modes/interactive/components/bordered-loader.d.ts +12 -0
  166. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
  167. package/dist/modes/interactive/components/bordered-loader.js +30 -0
  168. package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
  169. package/dist/modes/interactive/components/branch-summary-message.d.ts +14 -0
  170. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
  171. package/dist/modes/interactive/components/branch-summary-message.js +35 -0
  172. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
  173. package/dist/modes/interactive/components/compaction-summary-message.d.ts +14 -0
  174. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
  175. package/dist/modes/interactive/components/compaction-summary-message.js +36 -0
  176. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
  177. package/dist/modes/interactive/components/dynamic-border.d.ts +5 -1
  178. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  179. package/dist/modes/interactive/components/dynamic-border.js +5 -1
  180. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  181. package/dist/modes/interactive/components/footer.d.ts +12 -6
  182. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  183. package/dist/modes/interactive/components/footer.js +57 -25
  184. package/dist/modes/interactive/components/footer.js.map +1 -1
  185. package/dist/modes/interactive/components/hook-editor.d.ts +15 -0
  186. package/dist/modes/interactive/components/hook-editor.d.ts.map +1 -0
  187. package/dist/modes/interactive/components/hook-editor.js +95 -0
  188. package/dist/modes/interactive/components/hook-editor.js.map +1 -0
  189. package/dist/modes/interactive/components/hook-message.d.ts +18 -0
  190. package/dist/modes/interactive/components/hook-message.d.ts.map +1 -0
  191. package/dist/modes/interactive/components/hook-message.js +80 -0
  192. package/dist/modes/interactive/components/hook-message.js.map +1 -0
  193. package/dist/modes/interactive/components/model-selector.d.ts +3 -3
  194. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  195. package/dist/modes/interactive/components/model-selector.js +1 -1
  196. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  197. package/dist/modes/interactive/components/tool-execution.d.ts +15 -2
  198. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  199. package/dist/modes/interactive/components/tool-execution.js +70 -21
  200. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  201. package/dist/modes/interactive/components/tree-selector.d.ts +52 -0
  202. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
  203. package/dist/modes/interactive/components/tree-selector.js +745 -0
  204. package/dist/modes/interactive/components/tree-selector.js.map +1 -0
  205. package/dist/modes/interactive/components/user-message-selector.d.ts +3 -3
  206. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  207. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  208. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  209. package/dist/modes/interactive/components/user-message.d.ts +1 -1
  210. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  211. package/dist/modes/interactive/components/user-message.js +2 -5
  212. package/dist/modes/interactive/components/user-message.js.map +1 -1
  213. package/dist/modes/interactive/interactive-mode.d.ts +29 -12
  214. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  215. package/dist/modes/interactive/interactive-mode.js +589 -208
  216. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  217. package/dist/modes/interactive/theme/dark.json +13 -1
  218. package/dist/modes/interactive/theme/light.json +13 -1
  219. package/dist/modes/interactive/theme/theme-schema.json +34 -0
  220. package/dist/modes/interactive/theme/theme.d.ts +20 -2
  221. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  222. package/dist/modes/interactive/theme/theme.js +135 -2
  223. package/dist/modes/interactive/theme/theme.js.map +1 -1
  224. package/dist/modes/print-mode.d.ts +3 -3
  225. package/dist/modes/print-mode.d.ts.map +1 -1
  226. package/dist/modes/print-mode.js +26 -20
  227. package/dist/modes/print-mode.js.map +1 -1
  228. package/dist/modes/rpc/rpc-client.d.ts +13 -10
  229. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  230. package/dist/modes/rpc/rpc-client.js +11 -10
  231. package/dist/modes/rpc/rpc-client.js.map +1 -1
  232. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  233. package/dist/modes/rpc/rpc-mode.js +88 -35
  234. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  235. package/dist/modes/rpc/rpc-types.d.ts +30 -11
  236. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  237. package/dist/modes/rpc/rpc-types.js.map +1 -1
  238. package/dist/utils/shell.d.ts +4 -2
  239. package/dist/utils/shell.d.ts.map +1 -1
  240. package/dist/utils/shell.js +36 -7
  241. package/dist/utils/shell.js.map +1 -1
  242. package/dist/utils/tools-manager.d.ts +1 -1
  243. package/dist/utils/tools-manager.d.ts.map +1 -1
  244. package/dist/utils/tools-manager.js +2 -2
  245. package/dist/utils/tools-manager.js.map +1 -1
  246. package/docs/compaction.md +388 -0
  247. package/docs/custom-tools.md +146 -43
  248. package/docs/extension-loading.md +1004 -0
  249. package/docs/hooks.md +562 -596
  250. package/docs/rpc.md +33 -19
  251. package/docs/sdk.md +93 -21
  252. package/docs/session-tree-plan.md +441 -0
  253. package/docs/session.md +172 -21
  254. package/docs/skills.md +2 -0
  255. package/docs/theme.md +31 -2
  256. package/docs/tree.md +197 -0
  257. package/docs/tui.md +343 -0
  258. package/examples/README.md +1 -9
  259. package/examples/custom-tools/hello/index.ts +4 -3
  260. package/examples/custom-tools/question/index.ts +4 -4
  261. package/examples/custom-tools/subagent/index.ts +7 -6
  262. package/examples/custom-tools/todo/index.ts +11 -5
  263. package/examples/hooks/README.md +29 -71
  264. package/examples/hooks/auto-commit-on-exit.ts +8 -9
  265. package/examples/hooks/confirm-destructive.ts +29 -30
  266. package/examples/hooks/custom-compaction.ts +20 -21
  267. package/examples/hooks/dirty-repo-guard.ts +41 -40
  268. package/examples/hooks/file-trigger.ts +10 -5
  269. package/examples/hooks/git-checkpoint.ts +16 -12
  270. package/examples/hooks/handoff.ts +150 -0
  271. package/examples/hooks/permission-gate.ts +1 -1
  272. package/examples/hooks/protected-paths.ts +1 -1
  273. package/examples/hooks/qna.ts +119 -0
  274. package/examples/hooks/snake.ts +343 -0
  275. package/examples/hooks/status-line.ts +40 -0
  276. package/examples/sdk/01-minimal.ts +1 -1
  277. package/examples/sdk/02-custom-model.ts +1 -1
  278. package/examples/sdk/03-custom-prompt.ts +1 -1
  279. package/examples/sdk/04-skills.ts +1 -1
  280. package/examples/sdk/05-tools.ts +4 -4
  281. package/examples/sdk/06-hooks.ts +1 -1
  282. package/examples/sdk/07-context-files.ts +1 -1
  283. package/examples/sdk/08-slash-commands.ts +6 -1
  284. package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
  285. package/examples/sdk/10-settings.ts +1 -1
  286. package/examples/sdk/11-sessions.ts +1 -1
  287. package/examples/sdk/12-full-control.ts +4 -7
  288. package/package.json +6 -6
  289. package/dist/core/compaction.d.ts.map +0 -1
  290. package/dist/core/compaction.js +0 -412
  291. package/dist/core/compaction.js.map +0 -1
  292. package/dist/core/export-html.d.ts +0 -23
  293. package/dist/core/export-html.d.ts.map +0 -1
  294. package/dist/core/export-html.js +0 -1185
  295. package/dist/core/export-html.js.map +0 -1
  296. package/dist/modes/interactive/components/compaction.d.ts +0 -15
  297. package/dist/modes/interactive/components/compaction.d.ts.map +0 -1
  298. package/dist/modes/interactive/components/compaction.js +0 -41
  299. package/dist/modes/interactive/components/compaction.js.map +0 -1
  300. package/docs/hooks-v2.md +0 -385
  301. package/docs/session-tree.md +0 -452
@@ -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
+ }