@redplanethq/corebrain 2.5.12 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +24 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/gateway/config.d.ts.map +1 -1
- package/dist/commands/gateway/config.js +57 -23
- package/dist/commands/gateway/config.js.map +1 -1
- package/dist/server/tools/coding-tools.d.ts.map +1 -1
- package/dist/server/tools/coding-tools.js +35 -1
- package/dist/server/tools/coding-tools.js.map +1 -1
- package/dist/tui/chat.d.ts +2 -0
- package/dist/tui/chat.d.ts.map +1 -0
- package/dist/tui/chat.js +309 -0
- package/dist/tui/chat.js.map +1 -0
- package/dist/tui/components/conversation-selector.d.ts +28 -0
- package/dist/tui/components/conversation-selector.d.ts.map +1 -0
- package/dist/tui/components/conversation-selector.js +170 -0
- package/dist/tui/components/conversation-selector.js.map +1 -0
- package/dist/tui/components/integrations-view.d.ts +27 -0
- package/dist/tui/components/integrations-view.d.ts.map +1 -0
- package/dist/tui/components/integrations-view.js +169 -0
- package/dist/tui/components/integrations-view.js.map +1 -0
- package/dist/tui/components/reminder-list.d.ts +28 -0
- package/dist/tui/components/reminder-list.d.ts.map +1 -0
- package/dist/tui/components/reminder-list.js +261 -0
- package/dist/tui/components/reminder-list.js.map +1 -0
- package/dist/tui/components/tool-call-item.d.ts +24 -0
- package/dist/tui/components/tool-call-item.d.ts.map +1 -0
- package/dist/tui/components/tool-call-item.js +176 -0
- package/dist/tui/components/tool-call-item.js.map +1 -0
- package/dist/tui/hooks/use-conversation.d.ts +17 -0
- package/dist/tui/hooks/use-conversation.d.ts.map +1 -0
- package/dist/tui/hooks/use-conversation.js +137 -0
- package/dist/tui/hooks/use-conversation.js.map +1 -0
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +2 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/themes.d.ts +27 -0
- package/dist/tui/themes.d.ts.map +1 -0
- package/dist/tui/themes.js +28 -0
- package/dist/tui/themes.js.map +1 -0
- package/dist/tui/utils/stream.d.ts +121 -0
- package/dist/tui/utils/stream.d.ts.map +1 -0
- package/dist/tui/utils/stream.js +158 -0
- package/dist/tui/utils/stream.js.map +1 -0
- package/dist/tui/utils/tool-names.d.ts +2 -0
- package/dist/tui/utils/tool-names.d.ts.map +1 -0
- package/dist/tui/utils/tool-names.js +18 -0
- package/dist/tui/utils/tool-names.js.map +1 -0
- package/dist/utils/app-bundle.d.ts.map +1 -1
- package/dist/utils/app-bundle.js.map +1 -1
- package/package.json +4 -3
- package/dist/utils/tmux.d.ts +0 -37
- package/dist/utils/tmux.d.ts.map +0 -1
- package/dist/utils/tmux.js +0 -96
- package/dist/utils/tmux.js.map +0 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { truncateToWidth } from '@mariozechner/pi-tui';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { getToolDisplayName } from '../utils/tool-names.js';
|
|
4
|
+
const PREVIEW_LINES = 3;
|
|
5
|
+
function toResultString(value) {
|
|
6
|
+
if (value === undefined || value === null)
|
|
7
|
+
return '';
|
|
8
|
+
if (typeof value === 'string')
|
|
9
|
+
return value;
|
|
10
|
+
try {
|
|
11
|
+
return JSON.stringify(value, null, 2);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return String(value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function argSummaryFromInput(input, raw) {
|
|
18
|
+
if (input) {
|
|
19
|
+
try {
|
|
20
|
+
const firstVal = Object.values(input)[0];
|
|
21
|
+
const str = typeof firstVal === 'string' ? firstVal : JSON.stringify(firstVal ?? '');
|
|
22
|
+
return str.length > 60 ? str.slice(0, 60) + '\u2026' : str;
|
|
23
|
+
}
|
|
24
|
+
catch { }
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(raw);
|
|
28
|
+
const firstVal = Object.values(parsed)[0];
|
|
29
|
+
const str = typeof firstVal === 'string' ? firstVal : JSON.stringify(firstVal ?? '');
|
|
30
|
+
return str.length > 60 ? str.slice(0, 60) + '\u2026' : str;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return raw.slice(0, 60);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export class ToolCallItem {
|
|
37
|
+
displayName;
|
|
38
|
+
args = '';
|
|
39
|
+
argSummary = '';
|
|
40
|
+
// result = the orchestrator's final text summary (for container tools)
|
|
41
|
+
// or the raw tool output (for leaf tools)
|
|
42
|
+
result = '';
|
|
43
|
+
children = [];
|
|
44
|
+
childrenByCallId = new Map();
|
|
45
|
+
isExpanded = false;
|
|
46
|
+
isDone = false;
|
|
47
|
+
constructor(toolName) {
|
|
48
|
+
this.displayName = getToolDisplayName(toolName);
|
|
49
|
+
}
|
|
50
|
+
appendArgsDelta(delta) {
|
|
51
|
+
this.args += delta;
|
|
52
|
+
}
|
|
53
|
+
setArgs(args) {
|
|
54
|
+
this.args = JSON.stringify(args);
|
|
55
|
+
}
|
|
56
|
+
/** Called on each tool-output-available — updates nested children in real-time */
|
|
57
|
+
updateFromOutputParts(parts) {
|
|
58
|
+
for (const part of parts) {
|
|
59
|
+
// Capture the orchestrator's final text summary
|
|
60
|
+
if (part.type === 'text' &&
|
|
61
|
+
part.state === 'done' &&
|
|
62
|
+
typeof part.text === 'string') {
|
|
63
|
+
this.result = part.text;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
// Skip non-tool parts (step-start, text without state=done, etc.)
|
|
67
|
+
if (!part.type.startsWith('tool-') || !part.toolCallId)
|
|
68
|
+
continue;
|
|
69
|
+
const toolName = part.type.slice('tool-'.length); // strip "tool-" prefix
|
|
70
|
+
const callId = part.toolCallId;
|
|
71
|
+
let child = this.childrenByCallId.get(callId);
|
|
72
|
+
if (!child) {
|
|
73
|
+
child = new ToolCallItem(toolName);
|
|
74
|
+
this.children.push(child);
|
|
75
|
+
this.childrenByCallId.set(callId, child);
|
|
76
|
+
}
|
|
77
|
+
if (part.input) {
|
|
78
|
+
child.args = JSON.stringify(part.input);
|
|
79
|
+
child.argSummary = argSummaryFromInput(part.input, child.args);
|
|
80
|
+
}
|
|
81
|
+
if (part.state === 'output-available' && !child.isDone) {
|
|
82
|
+
child.isDone = true;
|
|
83
|
+
child.result = toResultString(part.output);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
addChild(child) {
|
|
88
|
+
this.children.push(child);
|
|
89
|
+
}
|
|
90
|
+
setDone(result) {
|
|
91
|
+
this.isDone = true;
|
|
92
|
+
this.argSummary = argSummaryFromInput(undefined, this.args);
|
|
93
|
+
// For leaf tools (no children), store raw result
|
|
94
|
+
if (result !== undefined && this.children.length === 0) {
|
|
95
|
+
this.result = toResultString(result);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
toggleExpand() {
|
|
99
|
+
this.isExpanded = !this.isExpanded;
|
|
100
|
+
}
|
|
101
|
+
invalidate() { }
|
|
102
|
+
render(width) {
|
|
103
|
+
return this._render(width, 0);
|
|
104
|
+
}
|
|
105
|
+
_render(width, depth) {
|
|
106
|
+
const indent = ' '.repeat(depth);
|
|
107
|
+
const lines = [];
|
|
108
|
+
const dot = this.isDone ? chalk.green('●') : chalk.yellow('◌');
|
|
109
|
+
const header = this.isDone
|
|
110
|
+
? `${indent}${dot} ${chalk.bold(this.displayName)}${this.argSummary ? chalk.dim('(' + this.argSummary + ')') : ''}`
|
|
111
|
+
: `${indent}${dot} ${chalk.bold(this.displayName)} ${chalk.dim('(running...)')}`;
|
|
112
|
+
lines.push(truncateToWidth(header, width));
|
|
113
|
+
const hasChildren = this.children.length > 0;
|
|
114
|
+
// ── Still running: show children inline in real-time ──────────────────
|
|
115
|
+
if (!this.isDone && hasChildren) {
|
|
116
|
+
for (const child of this.children) {
|
|
117
|
+
for (const line of child._render(width, depth + 1)) {
|
|
118
|
+
lines.push(line);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return lines;
|
|
122
|
+
}
|
|
123
|
+
if (!this.isDone)
|
|
124
|
+
return lines;
|
|
125
|
+
// ── Done + expanded: show nested tools + full result text ─────────────
|
|
126
|
+
if (this.isExpanded) {
|
|
127
|
+
if (hasChildren) {
|
|
128
|
+
for (const child of this.children) {
|
|
129
|
+
for (const line of child._render(width, depth + 1)) {
|
|
130
|
+
lines.push(line);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else if (this.args) {
|
|
135
|
+
lines.push(truncateToWidth(chalk.dim(indent + ' args:'), width));
|
|
136
|
+
try {
|
|
137
|
+
const parsed = JSON.parse(this.args);
|
|
138
|
+
for (const line of JSON.stringify(parsed, null, 2).split('\n')) {
|
|
139
|
+
lines.push(truncateToWidth(indent + ' ' + chalk.dim(line), width));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
for (const line of this.args.split('\n')) {
|
|
144
|
+
lines.push(truncateToWidth(indent + ' ' + chalk.dim(line), width));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (this.result) {
|
|
149
|
+
lines.push(truncateToWidth(chalk.dim(indent + ' result:'), width));
|
|
150
|
+
for (const line of this.result.split('\n')) {
|
|
151
|
+
lines.push(truncateToWidth(indent + ' ' + chalk.dim(line), width));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
lines.push(truncateToWidth(chalk.dim(indent + ' \u2514\u2500 ctrl+o to collapse'), width));
|
|
155
|
+
return lines;
|
|
156
|
+
}
|
|
157
|
+
// ── Done + collapsed: show result preview only (children hidden) ──────
|
|
158
|
+
if (this.result) {
|
|
159
|
+
const resultLines = this.result
|
|
160
|
+
.split('\n')
|
|
161
|
+
.filter((l) => l.trim().length > 0);
|
|
162
|
+
for (const line of resultLines.slice(0, PREVIEW_LINES)) {
|
|
163
|
+
lines.push(truncateToWidth(indent + ' \u2502 ' + chalk.dim(line), width));
|
|
164
|
+
}
|
|
165
|
+
const extra = resultLines.length - PREVIEW_LINES;
|
|
166
|
+
lines.push(truncateToWidth(chalk.dim(extra > 0
|
|
167
|
+
? `${indent} \u2514\u2500 +${extra} lines (ctrl+o to expand)`
|
|
168
|
+
: `${indent} \u2514\u2500 ctrl+o to expand`), width));
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
lines.push(truncateToWidth(chalk.dim(indent + ' \u2514\u2500 ctrl+o to expand'), width));
|
|
172
|
+
}
|
|
173
|
+
return lines;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=tool-call-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-call-item.js","sourceRoot":"","sources":["../../../src/tui/components/tool-call-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAG1D,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,SAAS,cAAc,CAAC,KAAc;IACrC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACF,CAAC;AAED,SAAS,mBAAmB,CAC3B,KAA0C,EAC1C,GAAW;IAEX,IAAI,KAAK,EAAE,CAAC;QACX,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,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,KAAK,CAAC,IAAI,CACT,eAAe,CACd,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,iCAAiC,CAAC,EACrD,KAAK,CACL,CACD,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;CACD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToolCallItem } from '../components/tool-call-item.js';
|
|
2
|
+
export interface ConversationCallbacks {
|
|
3
|
+
onTextDelta: (delta: string) => void;
|
|
4
|
+
onToolStart?: (id: string, name: string, item: ToolCallItem) => void;
|
|
5
|
+
onRerender?: () => void;
|
|
6
|
+
onStepFinish?: () => void;
|
|
7
|
+
onFinish?: () => void;
|
|
8
|
+
onError?: (err: Error) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface Conversation {
|
|
11
|
+
readonly conversationId: string | null;
|
|
12
|
+
send(message: string, callbacks: ConversationCallbacks): Promise<void>;
|
|
13
|
+
clear(): void;
|
|
14
|
+
resume(id: string): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createConversation(baseUrl: string, apiKey: string): Conversation;
|
|
17
|
+
//# sourceMappingURL=use-conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-conversation.d.ts","sourceRoot":"","sources":["../../../src/tui/hooks/use-conversation.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAI7D,MAAM,WAAW,qBAAqB;IACrC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACrE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAOD,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACZ,YAAY,CA6Jd"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { createConversationApi, streamConversation } from '../utils/stream.js';
|
|
2
|
+
import { ToolCallItem } from '../components/tool-call-item.js';
|
|
3
|
+
// Tools whose sub-calls should be shown as nested children
|
|
4
|
+
const CONTAINER_TOOLS = new Set(['gather_context', 'take_action']);
|
|
5
|
+
// ── Factory (hook-like, no React required) ────────────────────────────────────
|
|
6
|
+
export function createConversation(baseUrl, apiKey) {
|
|
7
|
+
let conversationId = null;
|
|
8
|
+
return {
|
|
9
|
+
get conversationId() {
|
|
10
|
+
return conversationId;
|
|
11
|
+
},
|
|
12
|
+
clear() {
|
|
13
|
+
conversationId = null;
|
|
14
|
+
},
|
|
15
|
+
resume(id) {
|
|
16
|
+
conversationId = id;
|
|
17
|
+
},
|
|
18
|
+
async send(message, callbacks) {
|
|
19
|
+
try {
|
|
20
|
+
if (!conversationId) {
|
|
21
|
+
conversationId = await createConversationApi(baseUrl, apiKey, message);
|
|
22
|
+
}
|
|
23
|
+
const activeTools = new Map();
|
|
24
|
+
// The currently-running container tool (gather_context / take_action)
|
|
25
|
+
let activeParent = null;
|
|
26
|
+
for await (const event of streamConversation(baseUrl, apiKey, conversationId, message)) {
|
|
27
|
+
switch (event.type) {
|
|
28
|
+
case 'text-delta': {
|
|
29
|
+
callbacks.onTextDelta(event.delta);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case 'tool-input-start': {
|
|
33
|
+
const item = new ToolCallItem(event.toolName);
|
|
34
|
+
activeTools.set(event.toolCallId, item);
|
|
35
|
+
if (CONTAINER_TOOLS.has(event.toolName)) {
|
|
36
|
+
// Container tool — show at top level, track as parent
|
|
37
|
+
activeParent = { id: event.toolCallId, item };
|
|
38
|
+
callbacks.onToolStart?.(event.toolCallId, event.toolName, item);
|
|
39
|
+
}
|
|
40
|
+
else if (activeParent) {
|
|
41
|
+
// Nested tool — attach as child of the active container
|
|
42
|
+
activeParent.item.addChild(item);
|
|
43
|
+
callbacks.onRerender?.();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
callbacks.onToolStart?.(event.toolCallId, event.toolName, item);
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
case 'tool-input-delta': {
|
|
51
|
+
activeTools
|
|
52
|
+
.get(event.toolCallId)
|
|
53
|
+
?.appendArgsDelta(event.inputTextDelta);
|
|
54
|
+
callbacks.onRerender?.();
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case 'tool-call': {
|
|
58
|
+
// Non-streaming complete tool call
|
|
59
|
+
const item = new ToolCallItem(event.toolName);
|
|
60
|
+
item.setArgs(event.args);
|
|
61
|
+
activeTools.set(event.toolCallId, item);
|
|
62
|
+
if (CONTAINER_TOOLS.has(event.toolName)) {
|
|
63
|
+
activeParent = { id: event.toolCallId, item };
|
|
64
|
+
callbacks.onToolStart?.(event.toolCallId, event.toolName, item);
|
|
65
|
+
}
|
|
66
|
+
else if (activeParent) {
|
|
67
|
+
item.setDone();
|
|
68
|
+
activeParent.item.addChild(item);
|
|
69
|
+
callbacks.onRerender?.();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
callbacks.onToolStart?.(event.toolCallId, event.toolName, item);
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case 'tool-output-available': {
|
|
77
|
+
// Streaming output from gather_context / take_action —
|
|
78
|
+
// output.parts[] carries nested tool states in real-time
|
|
79
|
+
const parentItem = activeTools.get(event.toolCallId);
|
|
80
|
+
if (parentItem && event.output?.parts) {
|
|
81
|
+
parentItem.updateFromOutputParts(event.output.parts);
|
|
82
|
+
}
|
|
83
|
+
// Mark parent done on final (non-preliminary) update
|
|
84
|
+
if (!event.preliminary && activeParent?.id === event.toolCallId) {
|
|
85
|
+
parentItem?.setDone();
|
|
86
|
+
activeParent = null;
|
|
87
|
+
}
|
|
88
|
+
callbacks.onRerender?.();
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case 'tool-result': {
|
|
92
|
+
const item = activeTools.get(event.toolCallId);
|
|
93
|
+
if (item) {
|
|
94
|
+
item.setDone(event.result);
|
|
95
|
+
if (activeParent?.id === event.toolCallId) {
|
|
96
|
+
activeParent = null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
callbacks.onRerender?.();
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case 'finish-step': {
|
|
103
|
+
for (const item of activeTools.values()) {
|
|
104
|
+
item.setDone();
|
|
105
|
+
}
|
|
106
|
+
activeParent = null;
|
|
107
|
+
activeTools.clear();
|
|
108
|
+
callbacks.onStepFinish?.();
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 'error': {
|
|
112
|
+
// AI SDK emits "terminated" as a normal end-of-stream signal
|
|
113
|
+
if (event.error === 'terminated')
|
|
114
|
+
break;
|
|
115
|
+
callbacks.onError?.(new Error(event.error));
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
default:
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Stream ended — fire finish once
|
|
123
|
+
callbacks.onFinish?.();
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
127
|
+
// undici throws "terminated" when the server closes the SSE connection normally
|
|
128
|
+
if (message === 'terminated') {
|
|
129
|
+
callbacks.onFinish?.();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
callbacks.onError?.(err instanceof Error ? err : new Error(message));
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=use-conversation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-conversation.js","sourceRoot":"","sources":["../../../src/tui/hooks/use-conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAoB7D,2DAA2D;AAC3D,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC;AAEnE,iFAAiF;AAEjF,MAAM,UAAU,kBAAkB,CACjC,OAAe,EACf,MAAc;IAEd,IAAI,cAAc,GAAkB,IAAI,CAAC;IAEzC,OAAO;QACN,IAAI,cAAc;YACjB,OAAO,cAAc,CAAC;QACvB,CAAC;QAED,KAAK;YACJ,cAAc,GAAG,IAAI,CAAC;QACvB,CAAC;QAED,MAAM,CAAC,EAAU;YAChB,cAAc,GAAG,EAAE,CAAC;QACrB,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,OAAe,EAAE,SAAgC;YAC3D,IAAI,CAAC;gBACJ,IAAI,CAAC,cAAc,EAAE,CAAC;oBACrB,cAAc,GAAG,MAAM,qBAAqB,CAC3C,OAAO,EACP,MAAM,EACN,OAAO,CACP,CAAC;gBACH,CAAC;gBAED,MAAM,WAAW,GAAG,IAAI,GAAG,EAAwB,CAAC;gBACpD,sEAAsE;gBACtE,IAAI,YAAY,GAA4C,IAAI,CAAC;gBAEjE,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,kBAAkB,CAC3C,OAAO,EACP,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B,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjE,gFAAgF;gBAChF,IAAI,OAAO,KAAK,YAAY,EAAE,CAAC;oBAC9B,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC;oBACvB,OAAO;gBACR,CAAC;gBAED,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACtE,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const editorTheme: {
|
|
2
|
+
borderColor: (s: string) => string;
|
|
3
|
+
selectList: {
|
|
4
|
+
selectedPrefix: (s: string) => string;
|
|
5
|
+
selectedText: (s: string) => string;
|
|
6
|
+
description: (s: string) => string;
|
|
7
|
+
scrollInfo: (s: string) => string;
|
|
8
|
+
noMatch: (s: string) => string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const markdownTheme: {
|
|
12
|
+
heading: (s: string) => string;
|
|
13
|
+
link: (s: string) => string;
|
|
14
|
+
linkUrl: (s: string) => string;
|
|
15
|
+
code: (s: string) => string;
|
|
16
|
+
codeBlock: (s: string) => string;
|
|
17
|
+
codeBlockBorder: (s: string) => string;
|
|
18
|
+
quote: (s: string) => string;
|
|
19
|
+
quoteBorder: (s: string) => string;
|
|
20
|
+
hr: (s: string) => string;
|
|
21
|
+
listBullet: (s: string) => string;
|
|
22
|
+
bold: (s: string) => string;
|
|
23
|
+
italic: (s: string) => string;
|
|
24
|
+
strikethrough: (s: string) => string;
|
|
25
|
+
underline: (s: string) => string;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/tui/themes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;qBACN,MAAM;;4BAEF,MAAM;0BACR,MAAM;yBACP,MAAM;wBACP,MAAM;qBACT,MAAM;;CAEpB,CAAC;AAEF,eAAO,MAAM,aAAa;iBACZ,MAAM;cACT,MAAM;iBACH,MAAM;cACT,MAAM;mBACD,MAAM;yBACA,MAAM;eAChB,MAAM;qBACA,MAAM;YACf,MAAM;oBACE,MAAM;cACZ,MAAM;gBACJ,MAAM;uBACC,MAAM;mBACV,MAAM;CACrB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export const editorTheme = {
|
|
3
|
+
borderColor: (s) => chalk.gray(s),
|
|
4
|
+
selectList: {
|
|
5
|
+
selectedPrefix: (s) => chalk.cyan(s),
|
|
6
|
+
selectedText: (s) => chalk.white(s),
|
|
7
|
+
description: (s) => chalk.gray(s),
|
|
8
|
+
scrollInfo: (s) => chalk.gray(s),
|
|
9
|
+
noMatch: (s) => chalk.gray(s),
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export const markdownTheme = {
|
|
13
|
+
heading: (s) => chalk.bold.cyan(s),
|
|
14
|
+
link: (s) => chalk.blue(s),
|
|
15
|
+
linkUrl: (s) => chalk.gray(s),
|
|
16
|
+
code: (s) => chalk.yellow(s),
|
|
17
|
+
codeBlock: (s) => chalk.yellow(s),
|
|
18
|
+
codeBlockBorder: (s) => chalk.gray(s),
|
|
19
|
+
quote: (s) => chalk.gray(s),
|
|
20
|
+
quoteBorder: (s) => chalk.gray(s),
|
|
21
|
+
hr: (s) => chalk.gray(s),
|
|
22
|
+
listBullet: (s) => chalk.cyan(s),
|
|
23
|
+
bold: (s) => chalk.bold(s),
|
|
24
|
+
italic: (s) => chalk.italic(s),
|
|
25
|
+
strikethrough: (s) => chalk.strikethrough(s),
|
|
26
|
+
underline: (s) => chalk.underline(s),
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/tui/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,WAAW,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,UAAU,EAAE;QACX,cAAc,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5C,YAAY,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3C,WAAW,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,UAAU,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACxC,OAAO,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;KACrC;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,OAAO,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,C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
+
name: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
description: string | null;
|
|
7
|
+
spec: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface IntegrationAccount {
|
|
10
|
+
id: string;
|
|
11
|
+
integrationDefinitionId: string;
|
|
12
|
+
integrationDefinition: {
|
|
13
|
+
name: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
};
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function fetchIntegrationDefinitions(baseUrl: string, apiKey: string): Promise<IntegrationDefinition[]>;
|
|
19
|
+
export declare function fetchIntegrationAccounts(baseUrl: string, apiKey: string): Promise<IntegrationAccount[]>;
|
|
20
|
+
export declare function connectApiKeyIntegration(baseUrl: string, apiKey: string, integrationDefinitionId: string, key: string): Promise<void>;
|
|
21
|
+
export type OutputPart = {
|
|
22
|
+
type: string;
|
|
23
|
+
toolCallId?: string;
|
|
24
|
+
state?: 'input-streaming' | 'output-available';
|
|
25
|
+
input?: Record<string, unknown>;
|
|
26
|
+
output?: unknown;
|
|
27
|
+
text?: string;
|
|
28
|
+
};
|
|
29
|
+
export type StreamEvent = {
|
|
30
|
+
type: 'text-start';
|
|
31
|
+
id: string;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'text-delta';
|
|
34
|
+
id: string;
|
|
35
|
+
delta: string;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'text-end';
|
|
38
|
+
id: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'tool-input-start';
|
|
41
|
+
toolCallId: string;
|
|
42
|
+
toolName: string;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'tool-input-delta';
|
|
45
|
+
toolCallId: string;
|
|
46
|
+
inputTextDelta: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: 'tool-input-end';
|
|
49
|
+
toolCallId: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'tool-input-available';
|
|
52
|
+
toolCallId: string;
|
|
53
|
+
toolName: string;
|
|
54
|
+
input: Record<string, unknown>;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'tool-call';
|
|
57
|
+
toolCallId: string;
|
|
58
|
+
toolName: string;
|
|
59
|
+
args: Record<string, unknown>;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'tool-result';
|
|
62
|
+
toolCallId: string;
|
|
63
|
+
result: unknown;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'tool-output-available';
|
|
66
|
+
toolCallId: string;
|
|
67
|
+
output: {
|
|
68
|
+
parts?: OutputPart[];
|
|
69
|
+
};
|
|
70
|
+
preliminary?: boolean;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'finish-step';
|
|
73
|
+
} | {
|
|
74
|
+
type: 'finish-message';
|
|
75
|
+
} | {
|
|
76
|
+
type: 'finish';
|
|
77
|
+
finishReason?: string;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'error';
|
|
80
|
+
error: string;
|
|
81
|
+
};
|
|
82
|
+
export declare function streamConversation(baseUrl: string, apiKey: string, conversationId: string, message: string): AsyncGenerator<StreamEvent>;
|
|
83
|
+
export interface ConversationSummary {
|
|
84
|
+
id: string;
|
|
85
|
+
title: string | null;
|
|
86
|
+
updatedAt: string;
|
|
87
|
+
source: string | null;
|
|
88
|
+
}
|
|
89
|
+
export interface ConversationsPage {
|
|
90
|
+
conversations: ConversationSummary[];
|
|
91
|
+
hasNext: boolean;
|
|
92
|
+
}
|
|
93
|
+
export declare function fetchConversations(baseUrl: string, apiKey: string, page?: number, limit?: number, source?: 'cli' | undefined): Promise<ConversationsPage>;
|
|
94
|
+
export interface ReminderSummary {
|
|
95
|
+
id: string;
|
|
96
|
+
text: string;
|
|
97
|
+
schedule: string;
|
|
98
|
+
channel: string;
|
|
99
|
+
isActive: boolean;
|
|
100
|
+
nextRunAt: string | null;
|
|
101
|
+
occurrenceCount: number;
|
|
102
|
+
maxOccurrences: number | null;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
}
|
|
105
|
+
export interface RemindersPage {
|
|
106
|
+
reminders: ReminderSummary[];
|
|
107
|
+
hasMore: boolean;
|
|
108
|
+
nextCursor: string | null;
|
|
109
|
+
}
|
|
110
|
+
export declare function fetchReminders(baseUrl: string, apiKey: string, cursor?: string, isActive?: 'true' | 'false', limit?: number): Promise<RemindersPage>;
|
|
111
|
+
export interface HistoryMessage {
|
|
112
|
+
id: string;
|
|
113
|
+
role: 'user' | 'assistant';
|
|
114
|
+
parts: Array<{
|
|
115
|
+
type: string;
|
|
116
|
+
text?: string;
|
|
117
|
+
}>;
|
|
118
|
+
}
|
|
119
|
+
export declare function fetchConversationHistory(baseUrl: string, apiKey: string, conversationId: string): Promise<HistoryMessage[]>;
|
|
120
|
+
export declare function createConversationApi(baseUrl: string, apiKey: string, message: string): Promise<string>;
|
|
121
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/tui/utils/stream.ts"],"names":[],"mappings":"AAKA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C;AAID,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC;IACpD,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,2BAA2B,CAChD,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAOl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