@dotdrelle/wiki-manager 0.6.31 → 0.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/bin/wiki-manager.js +1 -1
- package/package.json +8 -7
- package/src/agent/graph.js +5 -10
- package/src/cli/wiki-manager.js +17 -2
- package/src/commands/slash.js +104 -27
- package/src/commands/slash.test.js +68 -0
- package/src/core/compose.js +1 -1
- package/src/core/mcp.js +1 -1
- package/src/core/modelFetch.js +97 -0
- package/src/core/modelFetch.test.js +38 -0
- package/src/core/startupCheck.js +130 -0
- package/src/core/wikiSetup.js +156 -0
- package/src/core/wikirc.js +80 -1
- package/src/core/wikirc.test.js +111 -0
- package/src/core/workspaces.js +1 -1
- package/src/shell/LeftPane.tsx +54 -28
- package/src/shell/RightPane.tsx +25 -2
- package/src/shell/SetupWizard.tsx +806 -0
- package/src/shell/SlashDialog.tsx +4 -3
- package/src/shell/repl.js +20 -8
- package/src/shell/tui.tsx +85 -13
- package/src/shell/useSession.ts +15 -7
- package/wiki-workspace +3 -3
package/src/shell/RightPane.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource @opentui/solid */
|
|
2
|
-
import { Index, Show } from 'solid-js';
|
|
2
|
+
import { createMemo, Index, Show } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
type PlanStep = { step: number; description: string; status: string };
|
|
5
5
|
type QueueItem = {
|
|
@@ -12,6 +12,7 @@ type QueueItem = {
|
|
|
12
12
|
reason?: string;
|
|
13
13
|
};
|
|
14
14
|
type QueueInfo = { active: number; current: number; frozen: number };
|
|
15
|
+
type LogLineParts = { time: string | null; message: string };
|
|
15
16
|
|
|
16
17
|
const ACTIVITY_SLOTS = Array.from({ length: 6 }, (_, index) => index);
|
|
17
18
|
const LOG_SLOTS = Array.from({ length: 24 }, (_, index) => index);
|
|
@@ -51,6 +52,12 @@ function fit(value: string, width: number) {
|
|
|
51
52
|
return value.slice(0, max - 1) + '…';
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
function logLineParts(line: string): LogLineParts {
|
|
56
|
+
const match = line.match(/^((?:\d{1,2}:\d{2}(?::\d{2})?(?:\s?[AP]M)?|\d{4}-\d{2}-\d{2}[T ][0-9:.]+Z?))\s+(.+)$/i);
|
|
57
|
+
if (!match) return { time: null, message: line };
|
|
58
|
+
return { time: match[1], message: match[2] };
|
|
59
|
+
}
|
|
60
|
+
|
|
54
61
|
function activityColor(status: string) {
|
|
55
62
|
const value = String(status ?? '').toLowerCase();
|
|
56
63
|
if (['done', 'complete', 'completed', 'success'].includes(value)) return '#8BD5CA';
|
|
@@ -190,7 +197,23 @@ export function LogPanel(props: { logs: string[]; width: number }) {
|
|
|
190
197
|
<text width={lineWidth()} fg="#D6DEE8" content="Logs / Trace" />
|
|
191
198
|
<box flexGrow={1} flexDirection="column" overflow="hidden">
|
|
192
199
|
<Index each={LOG_SLOTS}>
|
|
193
|
-
{(slot) =>
|
|
200
|
+
{(slot) => {
|
|
201
|
+
const line = () => logLineAt(slot());
|
|
202
|
+
const parts = createMemo(() => logLineParts(line()));
|
|
203
|
+
const timeWidth = () => parts().time ? Math.min(parts().time!.length + 1, lineWidth()) : 0;
|
|
204
|
+
const messageWidth = () => Math.max(1, lineWidth() - timeWidth());
|
|
205
|
+
return (
|
|
206
|
+
<Show
|
|
207
|
+
when={parts().time}
|
|
208
|
+
fallback={<text width={lineWidth()} fg="#AAB7C4" content={line()} />}
|
|
209
|
+
>
|
|
210
|
+
<box height={1} flexDirection="row" overflow="hidden">
|
|
211
|
+
<text width={timeWidth()} fg="#89B4FA" content={fit(`${parts().time} `, timeWidth())} />
|
|
212
|
+
<text width={messageWidth()} fg="#AAB7C4" content={fit(parts().message, messageWidth())} />
|
|
213
|
+
</box>
|
|
214
|
+
</Show>
|
|
215
|
+
);
|
|
216
|
+
}}
|
|
194
217
|
</Index>
|
|
195
218
|
</box>
|
|
196
219
|
</box>
|