@yeshwanthyk/coding-agent 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/tui/app.js +29 -17
- package/dist/adapters/tui/{app.js.map → app.jsx.map} +1 -1
- package/dist/components/Footer.js +60 -24
- package/dist/components/{Footer.js.map → Footer.jsx.map} +1 -1
- package/dist/components/Header.js +312 -96
- package/dist/components/{Header.js.map → Header.jsx.map} +1 -1
- package/dist/components/MessageList.js +393 -146
- package/dist/components/MessageList.jsx.map +1 -0
- package/dist/runtime/context.js +15 -9
- package/dist/runtime/context.jsx.map +1 -0
- package/dist/session-picker.js +123 -69
- package/dist/session-picker.jsx.map +1 -0
- package/dist/tui-open-rendering.js +716 -343
- package/dist/tui-open-rendering.jsx.map +1 -0
- package/dist/ui/app-shell/TuiApp.js +590 -441
- package/dist/ui/app-shell/{TuiApp.js.map → TuiApp.jsx.map} +1 -1
- package/dist/ui/components/modals/ConfirmModal.js +80 -23
- package/dist/ui/components/modals/ConfirmModal.jsx.map +1 -0
- package/dist/ui/components/modals/EditorModal.js +55 -15
- package/dist/ui/components/modals/EditorModal.jsx.map +1 -0
- package/dist/ui/components/modals/InputModal.js +36 -9
- package/dist/ui/components/modals/InputModal.jsx.map +1 -0
- package/dist/ui/components/modals/ModalContainer.js +72 -16
- package/dist/ui/components/modals/ModalContainer.jsx.map +1 -0
- package/dist/ui/components/modals/SelectModal.js +53 -24
- package/dist/ui/components/modals/SelectModal.jsx.map +1 -0
- package/dist/ui/features/composer/Composer.js +145 -26
- package/dist/ui/features/composer/Composer.jsx.map +1 -0
- package/dist/ui/features/main-view/MainView.js +341 -248
- package/dist/ui/features/main-view/{MainView.js.map → MainView.jsx.map} +1 -1
- package/dist/ui/features/message-pane/MessagePane.js +46 -4
- package/dist/ui/features/message-pane/MessagePane.jsx.map +1 -0
- package/package.json +2 -2
- package/dist/components/MessageList.js.map +0 -1
- package/dist/runtime/context.js.map +0 -1
- package/dist/session-picker.js.map +0 -1
- package/dist/tui-open-rendering.js.map +0 -1
- package/dist/ui/components/modals/ConfirmModal.js.map +0 -1
- package/dist/ui/components/modals/EditorModal.js.map +0 -1
- package/dist/ui/components/modals/InputModal.js.map +0 -1
- package/dist/ui/components/modals/ModalContainer.js.map +0 -1
- package/dist/ui/components/modals/SelectModal.js.map +0 -1
- package/dist/ui/features/composer/Composer.js.map +0 -1
- package/dist/ui/features/message-pane/MessagePane.js.map +0 -1
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { effect as _$effect } from "@opentui/solid";
|
|
2
|
+
import { createTextNode as _$createTextNode } from "@opentui/solid";
|
|
3
|
+
import { insertNode as _$insertNode } from "@opentui/solid";
|
|
4
|
+
import { insert as _$insert } from "@opentui/solid";
|
|
5
|
+
import { setProp as _$setProp } from "@opentui/solid";
|
|
6
|
+
import { createElement as _$createElement } from "@opentui/solid";
|
|
7
|
+
import { createComponent as _$createComponent } from "@opentui/solid";
|
|
8
|
+
import { memo as _$memo } from "@opentui/solid";
|
|
2
9
|
/**
|
|
3
10
|
* MessageList component for rendering conversation content
|
|
4
11
|
*/
|
|
@@ -8,28 +15,110 @@ import { profile } from "../profiler.js";
|
|
|
8
15
|
import { ToolBlock as ToolBlockComponent } from "../tui-open-rendering.js";
|
|
9
16
|
// ----- Tool Block Wrapper -----
|
|
10
17
|
function ToolBlockWrapper(props) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
const expanded = createMemo(() => props.isExpanded(props.tool.id));
|
|
19
|
+
return _$createComponent(ToolBlockComponent, {
|
|
20
|
+
get name() {
|
|
21
|
+
return props.tool.name;
|
|
22
|
+
},
|
|
23
|
+
get args() {
|
|
24
|
+
return props.tool.args;
|
|
25
|
+
},
|
|
26
|
+
get output() {
|
|
27
|
+
return props.tool.output || null;
|
|
28
|
+
},
|
|
29
|
+
get editDiff() {
|
|
30
|
+
return props.tool.editDiff || null;
|
|
31
|
+
},
|
|
32
|
+
get isError() {
|
|
33
|
+
return props.tool.isError;
|
|
34
|
+
},
|
|
35
|
+
get isComplete() {
|
|
36
|
+
return props.tool.isComplete;
|
|
37
|
+
},
|
|
38
|
+
get expanded() {
|
|
39
|
+
return expanded();
|
|
40
|
+
},
|
|
41
|
+
get diffWrapMode() {
|
|
42
|
+
return props.diffWrapMode;
|
|
43
|
+
},
|
|
44
|
+
onToggleExpanded: () => props.onToggle(props.tool.id),
|
|
45
|
+
get onEditFile() {
|
|
46
|
+
return props.onEditFile;
|
|
47
|
+
},
|
|
48
|
+
get label() {
|
|
49
|
+
return props.tool.label;
|
|
50
|
+
},
|
|
51
|
+
get source() {
|
|
52
|
+
return props.tool.source;
|
|
53
|
+
},
|
|
54
|
+
get sourcePath() {
|
|
55
|
+
return props.tool.sourcePath;
|
|
56
|
+
},
|
|
57
|
+
get result() {
|
|
58
|
+
return props.tool.result;
|
|
59
|
+
},
|
|
60
|
+
get renderCall() {
|
|
61
|
+
return props.tool.renderCall;
|
|
62
|
+
},
|
|
63
|
+
get renderResult() {
|
|
64
|
+
return props.tool.renderResult;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
15
67
|
}
|
|
16
68
|
// ----- Thinking Block Wrapper -----
|
|
17
69
|
const THINKING_MAX_WIDTH = 50;
|
|
18
70
|
function truncateThinking(text) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return firstLine.slice(0, THINKING_MAX_WIDTH - 3) + "...";
|
|
71
|
+
const firstLine = text.split("\n")[0] || "";
|
|
72
|
+
if (firstLine.length <= THINKING_MAX_WIDTH) return firstLine;
|
|
73
|
+
return firstLine.slice(0, THINKING_MAX_WIDTH - 3) + "...";
|
|
23
74
|
}
|
|
24
75
|
function ThinkingBlockWrapper(props) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
76
|
+
const {
|
|
77
|
+
theme
|
|
78
|
+
} = useTheme();
|
|
79
|
+
const expanded = createMemo(() => props.isExpanded(props.id));
|
|
80
|
+
const preview = () => props.preview || truncateThinking(props.summary || props.full);
|
|
81
|
+
return (() => {
|
|
82
|
+
var _el$ = _$createElement("box"),
|
|
83
|
+
_el$2 = _$createElement("box"),
|
|
84
|
+
_el$3 = _$createElement("text"),
|
|
85
|
+
_el$4 = _$createTextNode(` `);
|
|
86
|
+
_$insertNode(_el$, _el$2);
|
|
87
|
+
_$setProp(_el$, "paddingLeft", 4);
|
|
88
|
+
_$setProp(_el$, "flexDirection", "column");
|
|
89
|
+
_$insertNode(_el$2, _el$3);
|
|
90
|
+
_$setProp(_el$2, "flexDirection", "row");
|
|
91
|
+
_$setProp(_el$2, "onMouseUp", e => {
|
|
92
|
+
if (e.isSelecting) return;
|
|
93
|
+
props.onToggle(props.id);
|
|
94
|
+
});
|
|
95
|
+
_$insertNode(_el$3, _el$4);
|
|
96
|
+
_$setProp(_el$3, "selectable", false);
|
|
97
|
+
_$insert(_el$3, () => expanded() ? "▾" : "▸", _el$4);
|
|
98
|
+
_$insert(_el$3, preview, null);
|
|
99
|
+
_$insert(_el$, _$createComponent(Show, {
|
|
100
|
+
get when() {
|
|
101
|
+
return expanded();
|
|
102
|
+
},
|
|
103
|
+
get children() {
|
|
104
|
+
var _el$5 = _$createElement("box");
|
|
105
|
+
_$setProp(_el$5, "paddingLeft", 2);
|
|
106
|
+
_$setProp(_el$5, "paddingTop", 1);
|
|
107
|
+
_$insert(_el$5, _$createComponent(Markdown, {
|
|
108
|
+
get text() {
|
|
109
|
+
return props.full;
|
|
110
|
+
},
|
|
111
|
+
get conceal() {
|
|
112
|
+
return props.concealMarkdown;
|
|
113
|
+
},
|
|
114
|
+
dim: true
|
|
115
|
+
}));
|
|
116
|
+
return _el$5;
|
|
117
|
+
}
|
|
118
|
+
}), null);
|
|
119
|
+
_$effect(_$p => _$setProp(_el$3, "fg", theme.textMuted, _$p));
|
|
120
|
+
return _el$;
|
|
121
|
+
})();
|
|
33
122
|
}
|
|
34
123
|
// ----- Content Items Builder -----
|
|
35
124
|
// Per-item cache: reuse ContentItem objects when data unchanged
|
|
@@ -39,144 +128,302 @@ let lastMessageCount = 0;
|
|
|
39
128
|
let lastFirstMessageId = null;
|
|
40
129
|
/** Get or create a cached ContentItem, preserving object identity when data matches */
|
|
41
130
|
function getCachedItem(key, current, isEqual) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
131
|
+
const cached = itemCache.get(key);
|
|
132
|
+
if (cached && cached.type === current.type && isEqual(cached, current)) {
|
|
133
|
+
return cached;
|
|
134
|
+
}
|
|
135
|
+
itemCache.set(key, current);
|
|
136
|
+
return current;
|
|
48
137
|
}
|
|
49
138
|
export function buildContentItems(messages, toolBlocks, thinkingVisible) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else if (block.type === "text") {
|
|
90
|
-
if (block.text) {
|
|
91
|
-
const item = { type: "assistant", content: block.text, isStreaming: msg.isStreaming };
|
|
92
|
-
if (msg.isStreaming) {
|
|
93
|
-
items.push(item);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
items.push(getCachedItem(`text:${msg.id}:${blockIdx}:final`, item, (a, b) => a.type === "assistant" && b.type === "assistant" &&
|
|
97
|
-
a.content === b.content && a.isStreaming === b.isStreaming));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
else if (block.type === "tool") {
|
|
102
|
-
if (!renderedToolIds.has(block.tool.id)) {
|
|
103
|
-
const item = { type: "tool", tool: block.tool };
|
|
104
|
-
items.push(getCachedItem(`tool:${block.tool.id}:${block.tool.isComplete}`, item, (a, b) => a.type === "tool" && b.type === "tool" &&
|
|
105
|
-
a.tool.id === b.tool.id && a.tool.isComplete === b.tool.isComplete &&
|
|
106
|
-
a.tool.output === b.tool.output &&
|
|
107
|
-
(a.tool.updateSeq ?? 0) === (b.tool.updateSeq ?? 0)));
|
|
108
|
-
renderedToolIds.add(block.tool.id);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
139
|
+
// Prune stale cache entries when message count decreases (e.g., clear)
|
|
140
|
+
if (messages.length < lastMessageCount) {
|
|
141
|
+
itemCache.clear();
|
|
142
|
+
}
|
|
143
|
+
lastMessageCount = messages.length;
|
|
144
|
+
const firstMessageId = messages.length > 0 ? messages[0].id : null;
|
|
145
|
+
if (firstMessageId !== lastFirstMessageId) {
|
|
146
|
+
if (lastFirstMessageId !== null) itemCache.clear();
|
|
147
|
+
lastFirstMessageId = firstMessageId;
|
|
148
|
+
}
|
|
149
|
+
const items = [];
|
|
150
|
+
const renderedToolIds = new Set();
|
|
151
|
+
for (let i = 0; i < messages.length; i++) {
|
|
152
|
+
const msg = messages[i];
|
|
153
|
+
const isLastMessage = i === messages.length - 1;
|
|
154
|
+
if (msg.role === "user") {
|
|
155
|
+
const item = {
|
|
156
|
+
type: "user",
|
|
157
|
+
content: msg.content
|
|
158
|
+
};
|
|
159
|
+
items.push(getCachedItem(`user:${msg.id}`, item, (a, b) => a.content === b.content));
|
|
160
|
+
} else if (msg.role === "assistant") {
|
|
161
|
+
// Use contentBlocks if available (preserves interleaved order)
|
|
162
|
+
if (msg.contentBlocks && msg.contentBlocks.length > 0) {
|
|
163
|
+
for (let blockIdx = 0; blockIdx < msg.contentBlocks.length; blockIdx++) {
|
|
164
|
+
const block = msg.contentBlocks[blockIdx];
|
|
165
|
+
if (block.type === "thinking") {
|
|
166
|
+
if (thinkingVisible) {
|
|
167
|
+
const item = {
|
|
168
|
+
type: "thinking",
|
|
169
|
+
id: block.id,
|
|
170
|
+
summary: block.summary,
|
|
171
|
+
preview: block.preview,
|
|
172
|
+
full: block.full,
|
|
173
|
+
isStreaming: msg.isStreaming
|
|
174
|
+
};
|
|
175
|
+
items.push(getCachedItem(`thinking:${msg.id}:${block.id}`, item, (a, b) => a.type === "thinking" && b.type === "thinking" && a.full === b.full && a.isStreaming === b.isStreaming));
|
|
112
176
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
a.full === b.full && a.isStreaming === b.isStreaming));
|
|
126
|
-
}
|
|
127
|
-
for (const tool of msg.tools || []) {
|
|
128
|
-
if (!renderedToolIds.has(tool.id)) {
|
|
129
|
-
const item = { type: "tool", tool };
|
|
130
|
-
items.push(getCachedItem(`tool:${tool.id}:${tool.isComplete}`, item, (a, b) => a.type === "tool" && b.type === "tool" &&
|
|
131
|
-
a.tool.id === b.tool.id && a.tool.isComplete === b.tool.isComplete &&
|
|
132
|
-
a.tool.output === b.tool.output &&
|
|
133
|
-
(a.tool.updateSeq ?? 0) === (b.tool.updateSeq ?? 0)));
|
|
134
|
-
renderedToolIds.add(tool.id);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (msg.content) {
|
|
138
|
-
const item = { type: "assistant", content: msg.content, isStreaming: msg.isStreaming };
|
|
139
|
-
if (msg.isStreaming) {
|
|
140
|
-
items.push(item);
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
items.push(getCachedItem(`text:${msg.id}:final`, item, (a, b) => a.type === "assistant" && b.type === "assistant" &&
|
|
144
|
-
a.content === b.content && a.isStreaming === b.isStreaming));
|
|
145
|
-
}
|
|
146
|
-
}
|
|
177
|
+
} else if (block.type === "text") {
|
|
178
|
+
if (block.text) {
|
|
179
|
+
const item = {
|
|
180
|
+
type: "assistant",
|
|
181
|
+
content: block.text,
|
|
182
|
+
isStreaming: msg.isStreaming
|
|
183
|
+
};
|
|
184
|
+
if (msg.isStreaming) {
|
|
185
|
+
items.push(item);
|
|
186
|
+
} else {
|
|
187
|
+
items.push(getCachedItem(`text:${msg.id}:${blockIdx}:final`, item, (a, b) => a.type === "assistant" && b.type === "assistant" && a.content === b.content && a.isStreaming === b.isStreaming));
|
|
188
|
+
}
|
|
147
189
|
}
|
|
148
|
-
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
(a.tool.updateSeq ?? 0) === (b.tool.updateSeq ?? 0)));
|
|
157
|
-
renderedToolIds.add(tool.id);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
190
|
+
} else if (block.type === "tool") {
|
|
191
|
+
if (!renderedToolIds.has(block.tool.id)) {
|
|
192
|
+
const item = {
|
|
193
|
+
type: "tool",
|
|
194
|
+
tool: block.tool
|
|
195
|
+
};
|
|
196
|
+
items.push(getCachedItem(`tool:${block.tool.id}:${block.tool.isComplete}`, item, (a, b) => a.type === "tool" && b.type === "tool" && a.tool.id === b.tool.id && a.tool.isComplete === b.tool.isComplete && a.tool.output === b.tool.output && (a.tool.updateSeq ?? 0) === (b.tool.updateSeq ?? 0)));
|
|
197
|
+
renderedToolIds.add(block.tool.id);
|
|
160
198
|
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
} else {
|
|
202
|
+
// Fallback: legacy format without contentBlocks
|
|
203
|
+
if (thinkingVisible && msg.thinking) {
|
|
204
|
+
const item = {
|
|
205
|
+
type: "thinking",
|
|
206
|
+
id: `thinking-${msg.id}`,
|
|
207
|
+
summary: msg.thinking.summary,
|
|
208
|
+
preview: msg.thinking.preview || truncateThinking(msg.thinking.summary || msg.thinking.full),
|
|
209
|
+
full: msg.thinking.full,
|
|
210
|
+
isStreaming: msg.isStreaming
|
|
211
|
+
};
|
|
212
|
+
items.push(getCachedItem(`thinking:${msg.id}`, item, (a, b) => a.type === "thinking" && b.type === "thinking" && a.full === b.full && a.isStreaming === b.isStreaming));
|
|
161
213
|
}
|
|
162
|
-
|
|
214
|
+
for (const tool of msg.tools || []) {
|
|
215
|
+
if (!renderedToolIds.has(tool.id)) {
|
|
163
216
|
const item = {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
output: msg.output,
|
|
167
|
-
exitCode: msg.exitCode,
|
|
168
|
-
truncated: msg.truncated,
|
|
169
|
-
tempFilePath: msg.tempFilePath,
|
|
217
|
+
type: "tool",
|
|
218
|
+
tool
|
|
170
219
|
};
|
|
171
|
-
items.push(getCachedItem(`
|
|
172
|
-
|
|
220
|
+
items.push(getCachedItem(`tool:${tool.id}:${tool.isComplete}`, item, (a, b) => a.type === "tool" && b.type === "tool" && a.tool.id === b.tool.id && a.tool.isComplete === b.tool.isComplete && a.tool.output === b.tool.output && (a.tool.updateSeq ?? 0) === (b.tool.updateSeq ?? 0)));
|
|
221
|
+
renderedToolIds.add(tool.id);
|
|
222
|
+
}
|
|
173
223
|
}
|
|
224
|
+
if (msg.content) {
|
|
225
|
+
const item = {
|
|
226
|
+
type: "assistant",
|
|
227
|
+
content: msg.content,
|
|
228
|
+
isStreaming: msg.isStreaming
|
|
229
|
+
};
|
|
230
|
+
if (msg.isStreaming) {
|
|
231
|
+
items.push(item);
|
|
232
|
+
} else {
|
|
233
|
+
items.push(getCachedItem(`text:${msg.id}:final`, item, (a, b) => a.type === "assistant" && b.type === "assistant" && a.content === b.content && a.isStreaming === b.isStreaming));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// For last message, include orphan toolBlocks from global state
|
|
238
|
+
if (isLastMessage) {
|
|
239
|
+
for (const tool of toolBlocks) {
|
|
240
|
+
if (!renderedToolIds.has(tool.id)) {
|
|
241
|
+
const item = {
|
|
242
|
+
type: "tool",
|
|
243
|
+
tool
|
|
244
|
+
};
|
|
245
|
+
items.push(getCachedItem(`tool:${tool.id}:${tool.isComplete}`, item, (a, b) => a.type === "tool" && b.type === "tool" && a.tool.id === b.tool.id && a.tool.isComplete === b.tool.isComplete && a.tool.output === b.tool.output && (a.tool.updateSeq ?? 0) === (b.tool.updateSeq ?? 0)));
|
|
246
|
+
renderedToolIds.add(tool.id);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
} else if (msg.role === "shell") {
|
|
251
|
+
const item = {
|
|
252
|
+
type: "shell",
|
|
253
|
+
command: msg.command,
|
|
254
|
+
output: msg.output,
|
|
255
|
+
exitCode: msg.exitCode,
|
|
256
|
+
truncated: msg.truncated,
|
|
257
|
+
tempFilePath: msg.tempFilePath
|
|
258
|
+
};
|
|
259
|
+
items.push(getCachedItem(`shell:${msg.id}`, item, (a, b) => a.type === "shell" && b.type === "shell" && a.command === b.command && a.output === b.output));
|
|
174
260
|
}
|
|
175
|
-
|
|
261
|
+
}
|
|
262
|
+
return items;
|
|
176
263
|
}
|
|
177
264
|
export function MessageList(props) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
265
|
+
const {
|
|
266
|
+
theme
|
|
267
|
+
} = useTheme();
|
|
268
|
+
const contentItems = createMemo(() => profile("build_content_items", () => buildContentItems(props.messages, props.toolBlocks, props.thinkingVisible)));
|
|
269
|
+
return (() => {
|
|
270
|
+
var _el$6 = _$createElement("box");
|
|
271
|
+
_$setProp(_el$6, "flexDirection", "column");
|
|
272
|
+
_$setProp(_el$6, "gap", 1);
|
|
273
|
+
_$setProp(_el$6, "paddingTop", 1);
|
|
274
|
+
_$insert(_el$6, _$createComponent(For, {
|
|
275
|
+
get each() {
|
|
276
|
+
return contentItems();
|
|
277
|
+
},
|
|
278
|
+
children: item => _$createComponent(Switch, {
|
|
279
|
+
get children() {
|
|
280
|
+
return [_$createComponent(Match, {
|
|
281
|
+
get when() {
|
|
282
|
+
return item.type === "user" && item;
|
|
283
|
+
},
|
|
284
|
+
children: userItem => (() => {
|
|
285
|
+
var _el$7 = _$createElement("box"),
|
|
286
|
+
_el$8 = _$createElement("text"),
|
|
287
|
+
_el$9 = _$createElement("span");
|
|
288
|
+
_$insertNode(_el$7, _el$8);
|
|
289
|
+
_$setProp(_el$7, "paddingLeft", 1);
|
|
290
|
+
_$insertNode(_el$8, _el$9);
|
|
291
|
+
_$insertNode(_el$9, _$createTextNode(`§ `));
|
|
292
|
+
_$insert(_el$8, () => userItem().content, null);
|
|
293
|
+
_$effect(_$p => _$setProp(_el$8, "fg", theme.primary, _$p));
|
|
294
|
+
return _el$7;
|
|
295
|
+
})()
|
|
296
|
+
}), _$createComponent(Match, {
|
|
297
|
+
get when() {
|
|
298
|
+
return item.type === "thinking" && item;
|
|
299
|
+
},
|
|
300
|
+
children: thinkingItem => _$createComponent(ThinkingBlockWrapper, {
|
|
301
|
+
get id() {
|
|
302
|
+
return thinkingItem().id;
|
|
303
|
+
},
|
|
304
|
+
get summary() {
|
|
305
|
+
return thinkingItem().summary;
|
|
306
|
+
},
|
|
307
|
+
get preview() {
|
|
308
|
+
return thinkingItem().preview;
|
|
309
|
+
},
|
|
310
|
+
get full() {
|
|
311
|
+
return thinkingItem().full;
|
|
312
|
+
},
|
|
313
|
+
get isExpanded() {
|
|
314
|
+
return props.isThinkingExpanded;
|
|
315
|
+
},
|
|
316
|
+
get onToggle() {
|
|
317
|
+
return props.toggleThinkingExpanded;
|
|
318
|
+
},
|
|
319
|
+
get concealMarkdown() {
|
|
320
|
+
return props.concealMarkdown;
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
}), _$createComponent(Match, {
|
|
324
|
+
get when() {
|
|
325
|
+
return item.type === "assistant" && item;
|
|
326
|
+
},
|
|
327
|
+
children: assistantItem => (() => {
|
|
328
|
+
var _el$1 = _$createElement("box");
|
|
329
|
+
_$setProp(_el$1, "paddingLeft", 1);
|
|
330
|
+
_$insert(_el$1, _$createComponent(Markdown, {
|
|
331
|
+
get text() {
|
|
332
|
+
return assistantItem().content;
|
|
333
|
+
},
|
|
334
|
+
get conceal() {
|
|
335
|
+
return props.concealMarkdown;
|
|
336
|
+
},
|
|
337
|
+
get streaming() {
|
|
338
|
+
return assistantItem().isStreaming;
|
|
339
|
+
}
|
|
340
|
+
}));
|
|
341
|
+
return _el$1;
|
|
342
|
+
})()
|
|
343
|
+
}), _$createComponent(Match, {
|
|
344
|
+
get when() {
|
|
345
|
+
return item.type === "tool" && item;
|
|
346
|
+
},
|
|
347
|
+
children: toolItem => (() => {
|
|
348
|
+
var _el$10 = _$createElement("box");
|
|
349
|
+
_$setProp(_el$10, "paddingLeft", 6);
|
|
350
|
+
_$insert(_el$10, _$createComponent(ToolBlockWrapper, {
|
|
351
|
+
get tool() {
|
|
352
|
+
return toolItem().tool;
|
|
353
|
+
},
|
|
354
|
+
get isExpanded() {
|
|
355
|
+
return props.isToolExpanded;
|
|
356
|
+
},
|
|
357
|
+
get onToggle() {
|
|
358
|
+
return props.toggleToolExpanded;
|
|
359
|
+
},
|
|
360
|
+
get diffWrapMode() {
|
|
361
|
+
return props.diffWrapMode;
|
|
362
|
+
},
|
|
363
|
+
get onEditFile() {
|
|
364
|
+
return props.onEditFile;
|
|
365
|
+
}
|
|
366
|
+
}));
|
|
367
|
+
return _el$10;
|
|
368
|
+
})()
|
|
369
|
+
}), _$createComponent(Match, {
|
|
370
|
+
get when() {
|
|
371
|
+
return item.type === "shell" && item;
|
|
372
|
+
},
|
|
373
|
+
children: shellItem => (() => {
|
|
374
|
+
var _el$11 = _$createElement("box"),
|
|
375
|
+
_el$12 = _$createElement("text"),
|
|
376
|
+
_el$13 = _$createElement("span");
|
|
377
|
+
_$insertNode(_el$11, _el$12);
|
|
378
|
+
_$setProp(_el$11, "paddingLeft", 1);
|
|
379
|
+
_$setProp(_el$11, "flexDirection", "column");
|
|
380
|
+
_$insertNode(_el$12, _el$13);
|
|
381
|
+
_$insertNode(_el$13, _$createTextNode(`$ `));
|
|
382
|
+
_$insert(_el$12, () => shellItem().command, null);
|
|
383
|
+
_$insert(_el$11, _$createComponent(Show, {
|
|
384
|
+
get when() {
|
|
385
|
+
return shellItem().output;
|
|
386
|
+
},
|
|
387
|
+
get children() {
|
|
388
|
+
var _el$15 = _$createElement("box"),
|
|
389
|
+
_el$16 = _$createElement("text");
|
|
390
|
+
_$insertNode(_el$15, _el$16);
|
|
391
|
+
_$setProp(_el$15, "paddingLeft", 2);
|
|
392
|
+
_$setProp(_el$15, "paddingTop", 1);
|
|
393
|
+
_$insert(_el$16, () => shellItem().output);
|
|
394
|
+
_$effect(_$p => _$setProp(_el$16, "fg", theme.textMuted, _$p));
|
|
395
|
+
return _el$15;
|
|
396
|
+
}
|
|
397
|
+
}), null);
|
|
398
|
+
_$insert(_el$11, _$createComponent(Show, {
|
|
399
|
+
get when() {
|
|
400
|
+
return _$memo(() => shellItem().exitCode !== null)() && shellItem().exitCode !== 0;
|
|
401
|
+
},
|
|
402
|
+
get children() {
|
|
403
|
+
var _el$17 = _$createElement("text");
|
|
404
|
+
_$insert(_el$17, () => `exit ${shellItem().exitCode}`);
|
|
405
|
+
_$effect(_$p => _$setProp(_el$17, "fg", theme.error, _$p));
|
|
406
|
+
return _el$17;
|
|
407
|
+
}
|
|
408
|
+
}), null);
|
|
409
|
+
_$insert(_el$11, _$createComponent(Show, {
|
|
410
|
+
get when() {
|
|
411
|
+
return _$memo(() => !!shellItem().truncated)() && shellItem().tempFilePath;
|
|
412
|
+
},
|
|
413
|
+
get children() {
|
|
414
|
+
var _el$18 = _$createElement("text");
|
|
415
|
+
_$insert(_el$18, () => `[truncated, full output: ${shellItem().tempFilePath}]`);
|
|
416
|
+
_$effect(_$p => _$setProp(_el$18, "fg", theme.textMuted, _$p));
|
|
417
|
+
return _el$18;
|
|
418
|
+
}
|
|
419
|
+
}), null);
|
|
420
|
+
_$effect(_$p => _$setProp(_el$12, "fg", theme.warning, _$p));
|
|
421
|
+
return _el$11;
|
|
422
|
+
})()
|
|
423
|
+
})];
|
|
424
|
+
}
|
|
425
|
+
})
|
|
426
|
+
}));
|
|
427
|
+
return _el$6;
|
|
428
|
+
})();
|
|
429
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageList.jsx","sourceRoot":"","sources":["../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE1E,iCAAiC;AAEjC,SAAS,gBAAgB,CAAC,KAMzB;IACA,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;IAElE,OAAO,CACN,CAAC,kBAAkB,CAClB,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CACtB,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CACtB,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAClC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,CACtC,OAAO,CAAC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,EAAE,IAAI,CACP;QAAA,EAAE,GAAG,CAAC,CACN,CACF;MAAA,EAAE,KAAK,CACR;KAAA,EAAE,MAAM,CAAC,CACT,CACF;GAAA,EAAE,GAAG,CACN;EAAA,EAAE,GAAG,CAAC,CACN,CAAA;AACF,CAAC"}
|
package/dist/runtime/context.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createComponent as _$createComponent } from "@opentui/solid";
|
|
2
2
|
import { createContext, useContext } from "solid-js";
|
|
3
3
|
const RuntimeContext = createContext(null);
|
|
4
|
-
export const RuntimeProvider =
|
|
4
|
+
export const RuntimeProvider = props => _$createComponent(RuntimeContext.Provider, {
|
|
5
|
+
get value() {
|
|
6
|
+
return props.runtime;
|
|
7
|
+
},
|
|
8
|
+
get children() {
|
|
9
|
+
return props.children;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
5
12
|
export const useRuntime = () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=context.js.map
|
|
13
|
+
const ctx = useContext(RuntimeContext);
|
|
14
|
+
if (!ctx) {
|
|
15
|
+
throw new Error("RuntimeContext not found");
|
|
16
|
+
}
|
|
17
|
+
return ctx;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.jsx","sourceRoot":"","sources":["../../src/runtime/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAY,MAAM,UAAU,CAAA;AAG9D,MAAM,cAAc,GAAG,aAAa,CAAyB,IAAI,CAAC,CAAA;AAElE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA0D,EAAE,EAAE,CAAC,CAC9F,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CACzF,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,GAAoB,EAAE;IAC/C,MAAM,GAAG,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACtC,IAAI,CAAC,GAAG,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC5C,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC,CAAA"}
|