@wrongstack/tui 0.299.0 → 0.300.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.
package/dist/index.js
CHANGED
|
@@ -298,8 +298,8 @@ import {
|
|
|
298
298
|
} from "@wrongstack/core/storage";
|
|
299
299
|
import React10, {
|
|
300
300
|
useCallback as useCallback26,
|
|
301
|
-
useEffect as
|
|
302
|
-
useRef as
|
|
301
|
+
useEffect as useEffect71,
|
|
302
|
+
useRef as useRef39
|
|
303
303
|
} from "react";
|
|
304
304
|
|
|
305
305
|
// src/ink.tsx
|
|
@@ -11864,6 +11864,7 @@ function createInitialState(options) {
|
|
|
11864
11864
|
exitConfirm: null,
|
|
11865
11865
|
slashConfirm: null,
|
|
11866
11866
|
escConfirm: null,
|
|
11867
|
+
fallbackOverlay: null,
|
|
11867
11868
|
sendModePicker: null,
|
|
11868
11869
|
contextChipVersion: 0,
|
|
11869
11870
|
fleet: {},
|
|
@@ -12668,6 +12669,9 @@ var dialogActionTypes = [
|
|
|
12668
12669
|
"slashConfirmClose",
|
|
12669
12670
|
"escConfirmOpen",
|
|
12670
12671
|
"escConfirmClose",
|
|
12672
|
+
"fallbackOverlayOpen",
|
|
12673
|
+
"fallbackOverlayMove",
|
|
12674
|
+
"fallbackOverlayClose",
|
|
12671
12675
|
"sendModePickerOpen",
|
|
12672
12676
|
"sendModePickerMove",
|
|
12673
12677
|
"sendModePickerClose",
|
|
@@ -12901,6 +12905,17 @@ function reduceDialogs(state, action) {
|
|
|
12901
12905
|
return { ...state, escConfirm: { snapshot: action.snapshot } };
|
|
12902
12906
|
case "escConfirmClose":
|
|
12903
12907
|
return { ...state, escConfirm: null };
|
|
12908
|
+
case "fallbackOverlayOpen":
|
|
12909
|
+
return { ...state, fallbackOverlay: action.info };
|
|
12910
|
+
case "fallbackOverlayMove": {
|
|
12911
|
+
if (!state.fallbackOverlay) return state;
|
|
12912
|
+
const n = state.fallbackOverlay.candidates.length;
|
|
12913
|
+
if (n === 0) return state;
|
|
12914
|
+
const next = (state.fallbackOverlay.selected + action.delta + n) % n;
|
|
12915
|
+
return { ...state, fallbackOverlay: { ...state.fallbackOverlay, selected: next } };
|
|
12916
|
+
}
|
|
12917
|
+
case "fallbackOverlayClose":
|
|
12918
|
+
return { ...state, fallbackOverlay: null };
|
|
12904
12919
|
case "sendModePickerOpen":
|
|
12905
12920
|
return { ...state, sendModePicker: action.info };
|
|
12906
12921
|
case "sendModePickerMove": {
|
|
@@ -14716,21 +14731,19 @@ function computeMaxSidebarScroll(state, viewportHeight = 20, effectiveSwarmOnSid
|
|
|
14716
14731
|
let contentHeight = 0;
|
|
14717
14732
|
contentHeight += 4;
|
|
14718
14733
|
contentHeight += 3;
|
|
14719
|
-
const
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
contentHeight += shownAgents * 2;
|
|
14734
|
+
const swarmOnSidebar = effectiveSwarmOnSidebar ?? state.settingsPicker.showAgentSwarmPanel === "sidebar";
|
|
14735
|
+
if (swarmOnSidebar) {
|
|
14736
|
+
const fleetEntries = Object.values(state.fleet);
|
|
14737
|
+
const leader = fleetEntries.find(
|
|
14738
|
+
(e) => e.id === "leader" || e.name === "Leader Agent"
|
|
14739
|
+
);
|
|
14740
|
+
const runningSubagents = fleetEntries.filter((e) => e !== leader).filter((e) => e.status === "running");
|
|
14741
|
+
const agentCap = leader ? 11 : 12;
|
|
14742
|
+
const shownAgents = (leader ? 1 : 0) + Math.min(runningSubagents.length, agentCap);
|
|
14743
|
+
contentHeight += 2 + shownAgents * 2;
|
|
14730
14744
|
if (runningSubagents.length > agentCap) contentHeight += 1;
|
|
14731
14745
|
contentHeight += 1;
|
|
14732
14746
|
}
|
|
14733
|
-
const swarmOnSidebar = effectiveSwarmOnSidebar ?? state.settingsPicker.showAgentSwarmPanel === "sidebar";
|
|
14734
14747
|
if (swarmOnSidebar) {
|
|
14735
14748
|
contentHeight += 1 + SIDEBAR_MISSION_ROWS * SIDEBAR_MISSION_MAX_WRAP_LINES + 1 + 1;
|
|
14736
14749
|
}
|
|
@@ -17666,6 +17679,28 @@ function useProviderEventBridge({
|
|
|
17666
17679
|
}
|
|
17667
17680
|
});
|
|
17668
17681
|
});
|
|
17682
|
+
const offFallbackPending = events.on("provider.fallback_pending", (e) => {
|
|
17683
|
+
const eventSessionId = e.sessionId;
|
|
17684
|
+
if (typeof eventSessionId === "string" && eventSessionId !== agent.ctx.session.id) return;
|
|
17685
|
+
const candidates = Array.isArray(e.candidates) ? e.candidates.map((c) => ({
|
|
17686
|
+
providerId: String(c.providerId ?? ""),
|
|
17687
|
+
model: String(c.model ?? "")
|
|
17688
|
+
})) : [];
|
|
17689
|
+
dispatch({
|
|
17690
|
+
type: "fallbackOverlayOpen",
|
|
17691
|
+
info: {
|
|
17692
|
+
requestId: String(e.requestId ?? ""),
|
|
17693
|
+
from: {
|
|
17694
|
+
providerId: String(e.from?.providerId ?? ""),
|
|
17695
|
+
model: String(e.from?.model ?? "")
|
|
17696
|
+
},
|
|
17697
|
+
status: typeof e.status === "number" ? e.status : 0,
|
|
17698
|
+
candidates,
|
|
17699
|
+
autoSwitchSeconds: typeof e.autoSwitchSeconds === "number" ? e.autoSwitchSeconds : 7,
|
|
17700
|
+
selected: 0
|
|
17701
|
+
}
|
|
17702
|
+
});
|
|
17703
|
+
});
|
|
17669
17704
|
const offProvResp = events.on("provider.response", (e) => {
|
|
17670
17705
|
if (activeRunGenerationRef.current !== sessionGenerationRef.current) return;
|
|
17671
17706
|
recordProviderResponse();
|
|
@@ -17862,6 +17897,7 @@ function useProviderEventBridge({
|
|
|
17862
17897
|
offRetry();
|
|
17863
17898
|
offProvErr();
|
|
17864
17899
|
offFallback();
|
|
17900
|
+
offFallbackPending();
|
|
17865
17901
|
offProvResp();
|
|
17866
17902
|
offConfirmNeeded();
|
|
17867
17903
|
offTrustPersisted();
|
|
@@ -31027,23 +31063,124 @@ function ExitConfirmPanel({
|
|
|
31027
31063
|
] });
|
|
31028
31064
|
}
|
|
31029
31065
|
|
|
31030
|
-
// src/components/
|
|
31066
|
+
// src/components/fallback-overlay.tsx
|
|
31067
|
+
import { useEffect as useEffect64, useRef as useRef35, useState as useState37 } from "react";
|
|
31031
31068
|
import { jsx as jsx56, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
31069
|
+
function FallbackOverlay({
|
|
31070
|
+
from,
|
|
31071
|
+
status,
|
|
31072
|
+
candidates,
|
|
31073
|
+
autoSwitchSeconds,
|
|
31074
|
+
selected,
|
|
31075
|
+
onChoose,
|
|
31076
|
+
onMove
|
|
31077
|
+
}) {
|
|
31078
|
+
const [remaining, setRemaining] = useState37(Math.max(1, autoSwitchSeconds));
|
|
31079
|
+
const resolvedRef = useRef35(false);
|
|
31080
|
+
const selectedRef = useRef35(selected);
|
|
31081
|
+
selectedRef.current = selected;
|
|
31082
|
+
const candidatesRef = useRef35(candidates);
|
|
31083
|
+
candidatesRef.current = candidates;
|
|
31084
|
+
const onChooseRef = useRef35(onChoose);
|
|
31085
|
+
onChooseRef.current = onChoose;
|
|
31086
|
+
useEffect64(() => {
|
|
31087
|
+
const id = setInterval(() => {
|
|
31088
|
+
setRemaining((prev) => {
|
|
31089
|
+
if (prev <= 1) {
|
|
31090
|
+
clearInterval(id);
|
|
31091
|
+
if (!resolvedRef.current) {
|
|
31092
|
+
resolvedRef.current = true;
|
|
31093
|
+
const chosen = candidatesRef.current[selectedRef.current] ?? null;
|
|
31094
|
+
onChooseRef.current(chosen);
|
|
31095
|
+
}
|
|
31096
|
+
return 0;
|
|
31097
|
+
}
|
|
31098
|
+
return prev - 1;
|
|
31099
|
+
});
|
|
31100
|
+
}, 1e3);
|
|
31101
|
+
return () => clearInterval(id);
|
|
31102
|
+
}, []);
|
|
31103
|
+
useInput((_input, key) => {
|
|
31104
|
+
if (resolvedRef.current) return;
|
|
31105
|
+
if (key.upArrow) {
|
|
31106
|
+
onMove(-1);
|
|
31107
|
+
return;
|
|
31108
|
+
}
|
|
31109
|
+
if (key.downArrow) {
|
|
31110
|
+
onMove(1);
|
|
31111
|
+
return;
|
|
31112
|
+
}
|
|
31113
|
+
if (key.return) {
|
|
31114
|
+
resolvedRef.current = true;
|
|
31115
|
+
const chosen = candidates[selected] ?? null;
|
|
31116
|
+
onChoose(chosen);
|
|
31117
|
+
return;
|
|
31118
|
+
}
|
|
31119
|
+
if (key.escape) {
|
|
31120
|
+
resolvedRef.current = true;
|
|
31121
|
+
onChoose(null);
|
|
31122
|
+
}
|
|
31123
|
+
});
|
|
31124
|
+
const fromLabel = `${from.providerId}/${from.model}`;
|
|
31125
|
+
return /* @__PURE__ */ jsxs54(
|
|
31126
|
+
Box,
|
|
31127
|
+
{
|
|
31128
|
+
alignSelf: "stretch",
|
|
31129
|
+
width: "100%",
|
|
31130
|
+
flexDirection: "column",
|
|
31131
|
+
borderStyle: "round",
|
|
31132
|
+
borderColor: theme.warn,
|
|
31133
|
+
paddingX: 1,
|
|
31134
|
+
children: [
|
|
31135
|
+
/* @__PURE__ */ jsxs54(Box, { height: 1, children: [
|
|
31136
|
+
/* @__PURE__ */ jsx56(Text, { color: theme.warn, bold: true, children: "\u26A0 MODEL FALLBACK" }),
|
|
31137
|
+
/* @__PURE__ */ jsx56(Text, { color: theme.textMuted, children: " " }),
|
|
31138
|
+
/* @__PURE__ */ jsxs54(Text, { color: theme.textSecondary, children: [
|
|
31139
|
+
fromLabel,
|
|
31140
|
+
" returned ",
|
|
31141
|
+
status
|
|
31142
|
+
] }),
|
|
31143
|
+
/* @__PURE__ */ jsx56(Box, { flexGrow: 1 }),
|
|
31144
|
+
/* @__PURE__ */ jsxs54(Text, { color: theme.warn, children: [
|
|
31145
|
+
"auto-switch in ",
|
|
31146
|
+
remaining,
|
|
31147
|
+
"s"
|
|
31148
|
+
] })
|
|
31149
|
+
] }),
|
|
31150
|
+
/* @__PURE__ */ jsxs54(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
31151
|
+
/* @__PURE__ */ jsx56(Text, { color: theme.textMuted, dimColor: true, children: "Select a fallback model (\u2191/\u2193 to move, Enter to pick, Esc for auto):" }),
|
|
31152
|
+
candidates.map((c, i) => {
|
|
31153
|
+
const isSel = i === selected;
|
|
31154
|
+
const label = `${c.providerId}/${c.model}`;
|
|
31155
|
+
return /* @__PURE__ */ jsxs54(Box, { height: 1, children: [
|
|
31156
|
+
/* @__PURE__ */ jsx56(Text, { color: isSel ? theme.warn : theme.textMuted, children: isSel ? "\u25B8 " : " " }),
|
|
31157
|
+
/* @__PURE__ */ jsx56(Text, { color: isSel ? theme.textPrimary : theme.textSecondary, bold: isSel, children: label })
|
|
31158
|
+
] }, `fb-${i}`);
|
|
31159
|
+
})
|
|
31160
|
+
] }),
|
|
31161
|
+
/* @__PURE__ */ jsx56(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx56(Text, { color: theme.textMuted, dimColor: true, children: "Enter picks \xB7 Esc auto-switches \xB7 countdown picks highlighted entry" }) })
|
|
31162
|
+
]
|
|
31163
|
+
}
|
|
31164
|
+
);
|
|
31165
|
+
}
|
|
31166
|
+
|
|
31167
|
+
// src/components/file-picker.tsx
|
|
31168
|
+
import { jsx as jsx57, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
31032
31169
|
function FilePicker({ query, matches, selected }) {
|
|
31033
31170
|
if (matches.length === 0) {
|
|
31034
|
-
return /* @__PURE__ */
|
|
31171
|
+
return /* @__PURE__ */ jsx57(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: /* @__PURE__ */ jsxs55(Text, { dimColor: true, children: [
|
|
31035
31172
|
"@",
|
|
31036
31173
|
query,
|
|
31037
31174
|
" \u2014 no matches"
|
|
31038
31175
|
] }) });
|
|
31039
31176
|
}
|
|
31040
|
-
return /* @__PURE__ */
|
|
31041
|
-
/* @__PURE__ */
|
|
31177
|
+
return /* @__PURE__ */ jsxs55(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
31178
|
+
/* @__PURE__ */ jsxs55(Text, { dimColor: true, children: [
|
|
31042
31179
|
"@",
|
|
31043
31180
|
query || "\u2026",
|
|
31044
31181
|
" \u2014 \u2191/\u2193 select, Enter attach, Esc cancel"
|
|
31045
31182
|
] }),
|
|
31046
|
-
matches.map((m, i) => /* @__PURE__ */
|
|
31183
|
+
matches.map((m, i) => /* @__PURE__ */ jsxs55(Text, { inverse: i === selected, ...i === selected ? { color: "cyan" } : {}, children: [
|
|
31047
31184
|
i === selected ? "\u203A " : " ",
|
|
31048
31185
|
highlight(m, query)
|
|
31049
31186
|
] }, m))
|
|
@@ -31054,7 +31191,7 @@ function highlight(path10, _query) {
|
|
|
31054
31191
|
}
|
|
31055
31192
|
|
|
31056
31193
|
// src/components/help-panel.tsx
|
|
31057
|
-
import { Fragment as Fragment18, jsx as
|
|
31194
|
+
import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31058
31195
|
var CATEGORY_ORDER2 = ["Run", "Session", "Inspect", "Agent", "Config", "App"];
|
|
31059
31196
|
var CHROME_ROWS3 = 7;
|
|
31060
31197
|
function normalizeQuery(raw) {
|
|
@@ -31127,29 +31264,29 @@ function HelpPanel({
|
|
|
31127
31264
|
const hiddenAbove = start;
|
|
31128
31265
|
const hiddenBelow = rows.length - end;
|
|
31129
31266
|
const hasFilter = query.length > 0;
|
|
31130
|
-
return /* @__PURE__ */
|
|
31131
|
-
/* @__PURE__ */
|
|
31132
|
-
/* @__PURE__ */
|
|
31133
|
-
/* @__PURE__ */
|
|
31267
|
+
return /* @__PURE__ */ jsxs56(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
31268
|
+
/* @__PURE__ */ jsx58(Text, { bold: true, color: "cyan", children: "\u2501\u2501 Help / Command Palette \u2501\u2501" }),
|
|
31269
|
+
/* @__PURE__ */ jsx58(Text, { dimColor: true, children: hasFilter ? `Filter: ${filter} (${filtered.length} match${filtered.length === 1 ? "" : "es"})` : "\u2191/\u2193 navigate \xB7 Enter run \xB7 Tab fill \xB7 type to filter \xB7 Esc close" }),
|
|
31270
|
+
/* @__PURE__ */ jsx58(Box, { marginTop: 1, flexDirection: "column", children: filtered.length === 0 ? /* @__PURE__ */ jsxs56(Text, { dimColor: true, children: [
|
|
31134
31271
|
'No commands match "',
|
|
31135
31272
|
filter,
|
|
31136
31273
|
'".'
|
|
31137
|
-
] }) : /* @__PURE__ */
|
|
31138
|
-
hiddenAbove > 0 && !hasFilter ? /* @__PURE__ */
|
|
31139
|
-
contextHeader && !hasFilter ? /* @__PURE__ */
|
|
31274
|
+
] }) : /* @__PURE__ */ jsxs56(Fragment18, { children: [
|
|
31275
|
+
hiddenAbove > 0 && !hasFilter ? /* @__PURE__ */ jsx58(Text, { dimColor: true, children: ` \u2191 ${hiddenAbove} more` }) : null,
|
|
31276
|
+
contextHeader && !hasFilter ? /* @__PURE__ */ jsxs56(Text, { bold: true, color: "yellow", dimColor: true, children: [
|
|
31140
31277
|
" ",
|
|
31141
31278
|
contextHeader
|
|
31142
31279
|
] }) : null,
|
|
31143
31280
|
visible.map((row) => {
|
|
31144
31281
|
if (row.type === "header") {
|
|
31145
|
-
return /* @__PURE__ */
|
|
31282
|
+
return /* @__PURE__ */ jsxs56(Text, { bold: true, color: "yellow", dimColor: true, children: [
|
|
31146
31283
|
" ",
|
|
31147
31284
|
row.category
|
|
31148
31285
|
] }, `cat-${row.category}`);
|
|
31149
31286
|
}
|
|
31150
31287
|
const { entry, index } = row;
|
|
31151
31288
|
const isSelected = index === focus;
|
|
31152
|
-
return /* @__PURE__ */
|
|
31289
|
+
return /* @__PURE__ */ jsxs56(
|
|
31153
31290
|
Text,
|
|
31154
31291
|
{
|
|
31155
31292
|
inverse: isSelected,
|
|
@@ -31157,20 +31294,20 @@ function HelpPanel({
|
|
|
31157
31294
|
wrap: "truncate-end",
|
|
31158
31295
|
children: [
|
|
31159
31296
|
isSelected ? "\u203A " : " ",
|
|
31160
|
-
/* @__PURE__ */
|
|
31297
|
+
/* @__PURE__ */ jsxs56(Text, { bold: true, children: [
|
|
31161
31298
|
"/",
|
|
31162
31299
|
entry.name
|
|
31163
31300
|
] }),
|
|
31164
|
-
entry.aliases && entry.aliases.length > 0 ? /* @__PURE__ */
|
|
31301
|
+
entry.aliases && entry.aliases.length > 0 ? /* @__PURE__ */ jsxs56(Text, { dimColor: true, children: [
|
|
31165
31302
|
" (",
|
|
31166
31303
|
entry.aliases.map((a) => `/${a}`).join(", "),
|
|
31167
31304
|
")"
|
|
31168
31305
|
] }) : null,
|
|
31169
|
-
/* @__PURE__ */
|
|
31306
|
+
/* @__PURE__ */ jsxs56(Text, { dimColor: true, children: [
|
|
31170
31307
|
" \u2014 ",
|
|
31171
31308
|
entry.description
|
|
31172
31309
|
] }),
|
|
31173
|
-
entry.argsHint ? /* @__PURE__ */
|
|
31310
|
+
entry.argsHint ? /* @__PURE__ */ jsxs56(Text, { dimColor: true, children: [
|
|
31174
31311
|
" ",
|
|
31175
31312
|
entry.argsHint
|
|
31176
31313
|
] }) : null
|
|
@@ -31179,30 +31316,30 @@ function HelpPanel({
|
|
|
31179
31316
|
entry.name
|
|
31180
31317
|
);
|
|
31181
31318
|
}),
|
|
31182
|
-
hiddenBelow > 0 && !hasFilter ? /* @__PURE__ */
|
|
31319
|
+
hiddenBelow > 0 && !hasFilter ? /* @__PURE__ */ jsx58(Text, { dimColor: true, children: ` \u2193 ${hiddenBelow} more` }) : null
|
|
31183
31320
|
] }) }),
|
|
31184
|
-
hint ? /* @__PURE__ */
|
|
31321
|
+
hint ? /* @__PURE__ */ jsx58(Box, { marginTop: 1, children: /* @__PURE__ */ jsx58(Text, { dimColor: true, children: hint }) }) : null
|
|
31185
31322
|
] });
|
|
31186
31323
|
}
|
|
31187
31324
|
|
|
31188
31325
|
// src/components/mcp-picker.tsx
|
|
31189
|
-
import { Fragment as Fragment19, jsx as
|
|
31326
|
+
import { Fragment as Fragment19, jsx as jsx59, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31190
31327
|
var CHROME_ROWS4 = 17;
|
|
31191
31328
|
function statusBadge(status, enabled) {
|
|
31192
|
-
if (!enabled) return /* @__PURE__ */
|
|
31329
|
+
if (!enabled) return /* @__PURE__ */ jsx59(Text, { dimColor: true, children: "\u25CB disabled" });
|
|
31193
31330
|
switch (status) {
|
|
31194
31331
|
case "connected":
|
|
31195
|
-
return /* @__PURE__ */
|
|
31332
|
+
return /* @__PURE__ */ jsx59(Text, { color: "green", children: "\u25CF connected" });
|
|
31196
31333
|
case "connecting":
|
|
31197
|
-
return /* @__PURE__ */
|
|
31334
|
+
return /* @__PURE__ */ jsx59(Text, { color: "cyan", children: "\u25D0 connecting" });
|
|
31198
31335
|
case "reconnecting":
|
|
31199
|
-
return /* @__PURE__ */
|
|
31336
|
+
return /* @__PURE__ */ jsx59(Text, { color: "cyan", children: "\u25D1 reconnecting" });
|
|
31200
31337
|
case "disconnected":
|
|
31201
|
-
return /* @__PURE__ */
|
|
31338
|
+
return /* @__PURE__ */ jsx59(Text, { dimColor: true, children: "\u25CB disconnected" });
|
|
31202
31339
|
case "failed":
|
|
31203
|
-
return /* @__PURE__ */
|
|
31340
|
+
return /* @__PURE__ */ jsx59(Text, { color: "red", children: "\u2717 failed" });
|
|
31204
31341
|
default:
|
|
31205
|
-
return /* @__PURE__ */
|
|
31342
|
+
return /* @__PURE__ */ jsx59(Text, { dimColor: true, children: status });
|
|
31206
31343
|
}
|
|
31207
31344
|
}
|
|
31208
31345
|
function McpPicker({
|
|
@@ -31219,36 +31356,36 @@ function McpPicker({
|
|
|
31219
31356
|
const windowEnd = Math.min(windowStart + maxVisible, total);
|
|
31220
31357
|
const above = windowStart;
|
|
31221
31358
|
const below = total - windowEnd;
|
|
31222
|
-
return /* @__PURE__ */
|
|
31223
|
-
/* @__PURE__ */
|
|
31224
|
-
/* @__PURE__ */
|
|
31225
|
-
/* @__PURE__ */
|
|
31226
|
-
above > 0 ? /* @__PURE__ */
|
|
31359
|
+
return /* @__PURE__ */ jsxs57(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
31360
|
+
/* @__PURE__ */ jsx59(Text, { bold: true, color: "cyan", children: "MCP Servers" }),
|
|
31361
|
+
/* @__PURE__ */ jsx59(Text, { dimColor: true, children: "\u2191/\u2193 select \xB7 Enter/\u2190/\u2192 toggle enable \xB7 r restart \xB7 Esc close" }),
|
|
31362
|
+
/* @__PURE__ */ jsx59(Box, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx59(Text, { dimColor: true, children: busy ? "Loading servers\u2026" : "No MCP servers configured." }) : /* @__PURE__ */ jsxs57(Fragment19, { children: [
|
|
31363
|
+
above > 0 ? /* @__PURE__ */ jsx59(Text, { dimColor: true, children: ` \u2191 ${above} more` }) : null,
|
|
31227
31364
|
items.slice(windowStart, windowEnd).map((item, i) => {
|
|
31228
31365
|
const index = windowStart + i;
|
|
31229
31366
|
const focused = index === selected;
|
|
31230
31367
|
const marker = focused ? "\u203A" : " ";
|
|
31231
|
-
return /* @__PURE__ */
|
|
31368
|
+
return /* @__PURE__ */ jsxs57(Text, { color: focused ? "cyan" : void 0, wrap: "truncate-end", children: [
|
|
31232
31369
|
marker,
|
|
31233
31370
|
" ",
|
|
31234
31371
|
statusBadge(item.status, item.enabled),
|
|
31235
31372
|
" ",
|
|
31236
|
-
/* @__PURE__ */
|
|
31237
|
-
/* @__PURE__ */
|
|
31373
|
+
/* @__PURE__ */ jsx59(Text, { bold: true, children: item.name.padEnd(18) }),
|
|
31374
|
+
/* @__PURE__ */ jsxs57(Text, { dimColor: true, children: [
|
|
31238
31375
|
item.transport.padEnd(14),
|
|
31239
31376
|
item.toolCount > 0 ? `${item.toolCount} tools` : "",
|
|
31240
31377
|
item.lazy ? " lazy" : ""
|
|
31241
31378
|
] })
|
|
31242
31379
|
] }, item.name);
|
|
31243
31380
|
}),
|
|
31244
|
-
below > 0 ? /* @__PURE__ */
|
|
31381
|
+
below > 0 ? /* @__PURE__ */ jsx59(Text, { dimColor: true, children: ` \u2193 ${below} more` }) : null
|
|
31245
31382
|
] }) }),
|
|
31246
|
-
hint ? /* @__PURE__ */
|
|
31383
|
+
hint ? /* @__PURE__ */ jsx59(Box, { marginTop: 1, children: /* @__PURE__ */ jsx59(Text, { dimColor: true, children: hint }) }) : null
|
|
31247
31384
|
] });
|
|
31248
31385
|
}
|
|
31249
31386
|
|
|
31250
31387
|
// src/components/model-picker.tsx
|
|
31251
|
-
import { jsx as
|
|
31388
|
+
import { jsx as jsx60, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31252
31389
|
var MAX_VISIBLE2 = 10;
|
|
31253
31390
|
function getVisibleWindow2(selected, total) {
|
|
31254
31391
|
const half = Math.floor(MAX_VISIBLE2 / 2);
|
|
@@ -31276,27 +31413,27 @@ function ModelPicker({
|
|
|
31276
31413
|
}) {
|
|
31277
31414
|
const title = titleLabel ?? "Switch model";
|
|
31278
31415
|
if (step === "provider") {
|
|
31279
|
-
return /* @__PURE__ */
|
|
31280
|
-
/* @__PURE__ */
|
|
31281
|
-
/* @__PURE__ */
|
|
31282
|
-
providerOptions.length === 0 ? /* @__PURE__ */
|
|
31416
|
+
return /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI_COLORS.border, paddingX: 1, children: [
|
|
31417
|
+
/* @__PURE__ */ jsx60(Text, { color: UI_COLORS.title, bold: true, children: `\u2501\u2501 ${title} \u2014 Step 1/2: Pick provider \u2501\u2501` }),
|
|
31418
|
+
/* @__PURE__ */ jsx60(Text, { dimColor: true, children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel \xB7 Ctrl+C exit" }),
|
|
31419
|
+
providerOptions.length === 0 ? /* @__PURE__ */ jsx60(Text, { dimColor: true, children: "(no providers with keys \u2014 add one via `wstack auth`)" }) : /* @__PURE__ */ jsx60(Box, { flexDirection: "column", minHeight: providerOptions.length, children: providerOptions.map((p, i) => {
|
|
31283
31420
|
const isSelected = i === selected;
|
|
31284
31421
|
const famColor = colorForFamily(p.family);
|
|
31285
|
-
return /* @__PURE__ */
|
|
31422
|
+
return /* @__PURE__ */ jsxs58(
|
|
31286
31423
|
Text,
|
|
31287
31424
|
{
|
|
31288
31425
|
inverse: isSelected,
|
|
31289
31426
|
...isSelected ? { color: UI_COLORS.focused } : {},
|
|
31290
31427
|
children: [
|
|
31291
31428
|
isSelected ? "\u203A " : " ",
|
|
31292
|
-
/* @__PURE__ */
|
|
31293
|
-
/* @__PURE__ */
|
|
31429
|
+
/* @__PURE__ */ jsx60(Text, { bold: true, color: isSelected ? void 0 : famColor, children: p.id.padEnd(28) }),
|
|
31430
|
+
/* @__PURE__ */ jsxs58(Text, { color: isSelected ? void 0 : famColor, dimColor: !isSelected, children: [
|
|
31294
31431
|
" ",
|
|
31295
31432
|
"[",
|
|
31296
31433
|
p.family,
|
|
31297
31434
|
"]"
|
|
31298
31435
|
] }),
|
|
31299
|
-
/* @__PURE__ */
|
|
31436
|
+
/* @__PURE__ */ jsxs58(Text, { dimColor: true, children: [
|
|
31300
31437
|
" ",
|
|
31301
31438
|
p.models.length,
|
|
31302
31439
|
" model",
|
|
@@ -31307,15 +31444,15 @@ function ModelPicker({
|
|
|
31307
31444
|
p.id
|
|
31308
31445
|
);
|
|
31309
31446
|
}) }),
|
|
31310
|
-
hint ? /* @__PURE__ */
|
|
31447
|
+
hint ? /* @__PURE__ */ jsx60(Text, { color: UI_COLORS.hint, children: hint }) : null
|
|
31311
31448
|
] });
|
|
31312
31449
|
}
|
|
31313
31450
|
const total = filteredOptions.length;
|
|
31314
31451
|
const { start, end } = getVisibleWindow2(selected, total);
|
|
31315
31452
|
const visibleItems = filteredOptions.slice(start, end);
|
|
31316
31453
|
const searchHint = searchQuery ? ` | filter:"${searchQuery}" \u2192 ${total} match${total === 1 ? "" : "es"}` : total > MAX_VISIBLE2 ? ` (${total} models \u2014 type to filter)` : "";
|
|
31317
|
-
return /* @__PURE__ */
|
|
31318
|
-
/* @__PURE__ */
|
|
31454
|
+
return /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI_COLORS.border, paddingX: 1, children: [
|
|
31455
|
+
/* @__PURE__ */ jsxs58(Text, { color: UI_COLORS.title, bold: true, children: [
|
|
31319
31456
|
`\u2501\u2501 ${title} \u2014 Step 2/2: Pick model `,
|
|
31320
31457
|
"(",
|
|
31321
31458
|
pickedProviderId,
|
|
@@ -31323,9 +31460,9 @@ function ModelPicker({
|
|
|
31323
31460
|
")",
|
|
31324
31461
|
" \u2501\u2501"
|
|
31325
31462
|
] }),
|
|
31326
|
-
/* @__PURE__ */
|
|
31327
|
-
total === 0 ? /* @__PURE__ */
|
|
31328
|
-
start > 0 && /* @__PURE__ */
|
|
31463
|
+
/* @__PURE__ */ jsx60(Text, { dimColor: true, children: "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc back \xB7 Ctrl+C exit \xB7 type to filter" }),
|
|
31464
|
+
total === 0 ? /* @__PURE__ */ jsx60(Text, { dimColor: true, children: searchQuery ? `(no models match "${searchQuery}")` : "(no models known for this provider)" }) : /* @__PURE__ */ jsxs58(Box, { flexDirection: "column", minHeight: MAX_VISIBLE2 + 2, children: [
|
|
31465
|
+
start > 0 && /* @__PURE__ */ jsxs58(Text, { dimColor: true, children: [
|
|
31329
31466
|
"\u25B2 ",
|
|
31330
31467
|
start,
|
|
31331
31468
|
" above"
|
|
@@ -31333,7 +31470,7 @@ function ModelPicker({
|
|
|
31333
31470
|
visibleItems.map((id, vi) => {
|
|
31334
31471
|
const absoluteIndex = start + vi;
|
|
31335
31472
|
const isSelected = absoluteIndex === selected;
|
|
31336
|
-
return /* @__PURE__ */
|
|
31473
|
+
return /* @__PURE__ */ jsxs58(
|
|
31337
31474
|
Text,
|
|
31338
31475
|
{
|
|
31339
31476
|
inverse: isSelected,
|
|
@@ -31347,20 +31484,20 @@ function ModelPicker({
|
|
|
31347
31484
|
);
|
|
31348
31485
|
}),
|
|
31349
31486
|
Array.from({ length: MAX_VISIBLE2 - visibleItems.length }).map(
|
|
31350
|
-
(_, i) => /* @__PURE__ */
|
|
31487
|
+
(_, i) => /* @__PURE__ */ jsx60(Text, { children: " " }, `pad-${i}`)
|
|
31351
31488
|
),
|
|
31352
|
-
end < total && /* @__PURE__ */
|
|
31489
|
+
end < total && /* @__PURE__ */ jsxs58(Text, { dimColor: true, children: [
|
|
31353
31490
|
"\u25BC ",
|
|
31354
31491
|
total - end,
|
|
31355
31492
|
" below"
|
|
31356
31493
|
] })
|
|
31357
31494
|
] }),
|
|
31358
|
-
hint ? /* @__PURE__ */
|
|
31495
|
+
hint ? /* @__PURE__ */ jsx60(Text, { color: UI_COLORS.hint, children: hint }) : null
|
|
31359
31496
|
] });
|
|
31360
31497
|
}
|
|
31361
31498
|
|
|
31362
31499
|
// src/components/plugin-picker.tsx
|
|
31363
|
-
import { Fragment as Fragment20, jsx as
|
|
31500
|
+
import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31364
31501
|
var CHROME_ROWS5 = 17;
|
|
31365
31502
|
var MAX_PICKER_ITEMS = 15;
|
|
31366
31503
|
function PluginPicker({
|
|
@@ -31378,15 +31515,15 @@ function PluginPicker({
|
|
|
31378
31515
|
const above = windowStart;
|
|
31379
31516
|
const below = total - windowEnd;
|
|
31380
31517
|
const hasLockedRows = items.some((item) => item.lockable === false);
|
|
31381
|
-
return /* @__PURE__ */
|
|
31382
|
-
/* @__PURE__ */
|
|
31383
|
-
/* @__PURE__ */
|
|
31518
|
+
return /* @__PURE__ */ jsxs59(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
31519
|
+
/* @__PURE__ */ jsx61(Text, { bold: true, color: "cyan", children: "Plugin menu" }),
|
|
31520
|
+
/* @__PURE__ */ jsxs59(Text, { dimColor: true, children: [
|
|
31384
31521
|
"\u2191/\u2193 select \xB7 Enter/\u2190/\u2192 toggle",
|
|
31385
31522
|
hasLockedRows ? " \xB7 \u{1F512} = locked" : "",
|
|
31386
31523
|
" \xB7 Esc close"
|
|
31387
31524
|
] }),
|
|
31388
|
-
/* @__PURE__ */
|
|
31389
|
-
above > 0 ? /* @__PURE__ */
|
|
31525
|
+
/* @__PURE__ */ jsx61(Box, { marginTop: 1, flexDirection: "column", children: items.length === 0 ? /* @__PURE__ */ jsx61(Text, { dimColor: true, children: busy ? "Loading plugins\u2026" : "No plugins available." }) : /* @__PURE__ */ jsxs59(Fragment20, { children: [
|
|
31526
|
+
above > 0 ? /* @__PURE__ */ jsx61(Text, { dimColor: true, children: ` \u2191 ${above} more` }) : null,
|
|
31390
31527
|
items.slice(windowStart, windowEnd).map((item, i) => {
|
|
31391
31528
|
const index = windowStart + i;
|
|
31392
31529
|
const focused = index === selected;
|
|
@@ -31395,16 +31532,16 @@ function PluginPicker({
|
|
|
31395
31532
|
const state = item.enabled ? "\u25CF on " : "\u25CB off";
|
|
31396
31533
|
const color = item.enabled ? "green" : "gray";
|
|
31397
31534
|
const lock = isLocked ? "\u{1F512}" : " ";
|
|
31398
|
-
return /* @__PURE__ */
|
|
31535
|
+
return /* @__PURE__ */ jsxs59(Text, { color: focused ? "cyan" : void 0, wrap: "truncate-end", children: [
|
|
31399
31536
|
marker,
|
|
31400
31537
|
" ",
|
|
31401
|
-
/* @__PURE__ */
|
|
31538
|
+
/* @__PURE__ */ jsx61(Text, { color, children: state }),
|
|
31402
31539
|
" ",
|
|
31403
31540
|
item.name.padEnd(18),
|
|
31404
31541
|
" ",
|
|
31405
|
-
/* @__PURE__ */
|
|
31542
|
+
/* @__PURE__ */ jsx61(Text, { color: isLocked ? "yellow" : void 0, children: lock }),
|
|
31406
31543
|
" ",
|
|
31407
|
-
/* @__PURE__ */
|
|
31544
|
+
/* @__PURE__ */ jsxs59(Text, { dimColor: true, children: [
|
|
31408
31545
|
"risk=",
|
|
31409
31546
|
item.risk.padEnd(6)
|
|
31410
31547
|
] }),
|
|
@@ -31412,14 +31549,14 @@ function PluginPicker({
|
|
|
31412
31549
|
item.summary
|
|
31413
31550
|
] }, item.name);
|
|
31414
31551
|
}),
|
|
31415
|
-
below > 0 ? /* @__PURE__ */
|
|
31552
|
+
below > 0 ? /* @__PURE__ */ jsx61(Text, { dimColor: true, children: ` \u2193 ${below} more` }) : null
|
|
31416
31553
|
] }) }),
|
|
31417
|
-
hint ? /* @__PURE__ */
|
|
31554
|
+
hint ? /* @__PURE__ */ jsx61(Box, { marginTop: 1, children: /* @__PURE__ */ jsx61(Text, { dimColor: true, children: hint }) }) : null
|
|
31418
31555
|
] });
|
|
31419
31556
|
}
|
|
31420
31557
|
|
|
31421
31558
|
// src/components/project-picker.tsx
|
|
31422
|
-
import { jsx as
|
|
31559
|
+
import { jsx as jsx62, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
31423
31560
|
function actionIcon(key) {
|
|
31424
31561
|
if (key === "new-session") return glyphs.sessions;
|
|
31425
31562
|
if (key === "prev-sessions") return glyphs.clock;
|
|
@@ -31439,71 +31576,71 @@ function ProjectPicker({
|
|
|
31439
31576
|
const window = panelWindow(items.length, selected, limit);
|
|
31440
31577
|
const visible = items.slice(window.start, window.end);
|
|
31441
31578
|
const labelWidth = Math.max(12, size.contentWidth - 16);
|
|
31442
|
-
return /* @__PURE__ */
|
|
31579
|
+
return /* @__PURE__ */ jsxs60(
|
|
31443
31580
|
MonitorShell,
|
|
31444
31581
|
{
|
|
31445
31582
|
accent: theme.accent,
|
|
31446
31583
|
icon: glyphs.folder,
|
|
31447
31584
|
title: "PROJECTS",
|
|
31448
31585
|
kicker: size.columns >= 58 ? "workspace switcher" : void 0,
|
|
31449
|
-
right: /* @__PURE__ */
|
|
31586
|
+
right: /* @__PURE__ */ jsxs60(Text, { color: theme.textMuted, children: [
|
|
31450
31587
|
projectCount,
|
|
31451
31588
|
" project",
|
|
31452
31589
|
projectCount === 1 ? "" : "s"
|
|
31453
31590
|
] }),
|
|
31454
|
-
footer: /* @__PURE__ */
|
|
31455
|
-
/* @__PURE__ */
|
|
31456
|
-
/* @__PURE__ */
|
|
31457
|
-
size.columns >= 64 ? /* @__PURE__ */
|
|
31591
|
+
footer: /* @__PURE__ */ jsxs60(Box, { gap: 2, children: [
|
|
31592
|
+
/* @__PURE__ */ jsx62(KeyCap, { keyName: "\u2191\u2193", label: "navigate" }),
|
|
31593
|
+
/* @__PURE__ */ jsx62(KeyCap, { keyName: "Enter", label: "open", color: theme.success }),
|
|
31594
|
+
size.columns >= 64 ? /* @__PURE__ */ jsx62(KeyCap, { keyName: "Esc", label: "close", color: theme.error }) : null
|
|
31458
31595
|
] }),
|
|
31459
31596
|
children: [
|
|
31460
|
-
/* @__PURE__ */
|
|
31461
|
-
/* @__PURE__ */
|
|
31597
|
+
/* @__PURE__ */ jsxs60(Box, { height: 1, marginTop: 1, children: [
|
|
31598
|
+
/* @__PURE__ */ jsxs60(Text, { color: filter ? theme.warn : theme.textMuted, children: [
|
|
31462
31599
|
glyphs.prompt,
|
|
31463
31600
|
" "
|
|
31464
31601
|
] }),
|
|
31465
|
-
/* @__PURE__ */
|
|
31466
|
-
filter ? /* @__PURE__ */
|
|
31467
|
-
/* @__PURE__ */
|
|
31468
|
-
/* @__PURE__ */
|
|
31602
|
+
/* @__PURE__ */ jsx62(Text, { color: filter ? theme.textPrimary : theme.textMuted, children: filter || "Type to filter projects and actions" }),
|
|
31603
|
+
filter ? /* @__PURE__ */ jsx62(Text, { color: theme.accent, children: "\u2588" }) : null,
|
|
31604
|
+
/* @__PURE__ */ jsx62(Box, { flexGrow: 1 }),
|
|
31605
|
+
/* @__PURE__ */ jsxs60(Text, { color: theme.textMuted, children: [
|
|
31469
31606
|
selectableCount,
|
|
31470
31607
|
" choices"
|
|
31471
31608
|
] })
|
|
31472
31609
|
] }),
|
|
31473
|
-
window.above > 0 ? /* @__PURE__ */
|
|
31610
|
+
window.above > 0 ? /* @__PURE__ */ jsxs60(Text, { color: theme.textMuted, children: [
|
|
31474
31611
|
" \u2191 ",
|
|
31475
31612
|
window.above,
|
|
31476
31613
|
" hidden"
|
|
31477
31614
|
] }) : null,
|
|
31478
|
-
visible.length === 0 ? /* @__PURE__ */
|
|
31615
|
+
visible.length === 0 ? /* @__PURE__ */ jsx62(
|
|
31479
31616
|
EmptyPanelState,
|
|
31480
31617
|
{
|
|
31481
31618
|
icon: glyphs.folder,
|
|
31482
31619
|
title: "No matching projects",
|
|
31483
31620
|
detail: "Clear the filter or add a project with /project add."
|
|
31484
31621
|
}
|
|
31485
|
-
) : /* @__PURE__ */
|
|
31622
|
+
) : /* @__PURE__ */ jsx62(Box, { flexDirection: "column", marginTop: 1, children: visible.map((item, offset) => {
|
|
31486
31623
|
const index = window.start + offset;
|
|
31487
31624
|
const isSelected = index === selected;
|
|
31488
31625
|
if (item.key === "__divider__") {
|
|
31489
|
-
return /* @__PURE__ */
|
|
31626
|
+
return /* @__PURE__ */ jsx62(Box, { height: 1, children: /* @__PURE__ */ jsx62(Text, { color: theme.textMuted, children: "\u2500".repeat(Math.min(32, size.contentWidth)) }) }, `${item.key}-${index}`);
|
|
31490
31627
|
}
|
|
31491
31628
|
const icon = item.kind === "project" ? glyphs.folder : actionIcon(item.key);
|
|
31492
31629
|
const accent = item.kind === "project" ? theme.accent : theme.warn;
|
|
31493
|
-
return /* @__PURE__ */
|
|
31630
|
+
return /* @__PURE__ */ jsxs60(
|
|
31494
31631
|
Box,
|
|
31495
31632
|
{
|
|
31496
31633
|
flexDirection: "column",
|
|
31497
31634
|
...isSelected && theme.supportsBackground ? { backgroundColor: theme.surfaceRaised } : {},
|
|
31498
31635
|
children: [
|
|
31499
|
-
/* @__PURE__ */
|
|
31500
|
-
/* @__PURE__ */
|
|
31501
|
-
/* @__PURE__ */
|
|
31636
|
+
/* @__PURE__ */ jsxs60(Box, { height: 1, children: [
|
|
31637
|
+
/* @__PURE__ */ jsx62(Text, { color: isSelected ? accent : theme.textMuted, children: isSelected ? "\u258E" : " " }),
|
|
31638
|
+
/* @__PURE__ */ jsxs60(Text, { color: accent, children: [
|
|
31502
31639
|
" ",
|
|
31503
31640
|
icon,
|
|
31504
31641
|
" "
|
|
31505
31642
|
] }),
|
|
31506
|
-
/* @__PURE__ */
|
|
31643
|
+
/* @__PURE__ */ jsx62(
|
|
31507
31644
|
Text,
|
|
31508
31645
|
{
|
|
31509
31646
|
color: isSelected ? theme.textPrimary : theme.textSecondary,
|
|
@@ -31511,24 +31648,24 @@ function ProjectPicker({
|
|
|
31511
31648
|
children: truncatePanelText(item.label, labelWidth)
|
|
31512
31649
|
}
|
|
31513
31650
|
),
|
|
31514
|
-
/* @__PURE__ */
|
|
31515
|
-
item.meta ? /* @__PURE__ */
|
|
31651
|
+
/* @__PURE__ */ jsx62(Box, { flexGrow: 1 }),
|
|
31652
|
+
item.meta ? /* @__PURE__ */ jsx62(Text, { color: isSelected ? accent : theme.textMuted, children: truncatePanelText(item.meta, 18) }) : null
|
|
31516
31653
|
] }),
|
|
31517
|
-
item.subtitle ? /* @__PURE__ */
|
|
31518
|
-
/* @__PURE__ */
|
|
31519
|
-
/* @__PURE__ */
|
|
31654
|
+
item.subtitle ? /* @__PURE__ */ jsxs60(Box, { height: 1, children: [
|
|
31655
|
+
/* @__PURE__ */ jsx62(Text, { color: isSelected ? accent : theme.textMuted, children: " \u2514\u2500 " }),
|
|
31656
|
+
/* @__PURE__ */ jsx62(Text, { color: theme.textMuted, children: truncatePanelText(item.subtitle, labelWidth) })
|
|
31520
31657
|
] }) : null
|
|
31521
31658
|
]
|
|
31522
31659
|
},
|
|
31523
31660
|
item.key
|
|
31524
31661
|
);
|
|
31525
31662
|
}) }),
|
|
31526
|
-
window.below > 0 ? /* @__PURE__ */
|
|
31663
|
+
window.below > 0 ? /* @__PURE__ */ jsxs60(Text, { color: theme.textMuted, children: [
|
|
31527
31664
|
" \u2193 ",
|
|
31528
31665
|
window.below,
|
|
31529
31666
|
" hidden"
|
|
31530
31667
|
] }) : null,
|
|
31531
|
-
hint ? /* @__PURE__ */
|
|
31668
|
+
hint ? /* @__PURE__ */ jsxs60(Text, { color: theme.warn, children: [
|
|
31532
31669
|
glyphs.warning,
|
|
31533
31670
|
" ",
|
|
31534
31671
|
hint
|
|
@@ -31539,8 +31676,8 @@ function ProjectPicker({
|
|
|
31539
31676
|
}
|
|
31540
31677
|
|
|
31541
31678
|
// src/components/refine-countdown-panel.tsx
|
|
31542
|
-
import { useEffect as
|
|
31543
|
-
import { jsx as
|
|
31679
|
+
import { useEffect as useEffect65, useRef as useRef36, useState as useState38 } from "react";
|
|
31680
|
+
import { jsx as jsx63, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
31544
31681
|
function RefineCountdownPanel({
|
|
31545
31682
|
original,
|
|
31546
31683
|
seconds,
|
|
@@ -31548,9 +31685,9 @@ function RefineCountdownPanel({
|
|
|
31548
31685
|
providerId,
|
|
31549
31686
|
model
|
|
31550
31687
|
}) {
|
|
31551
|
-
const [remaining, setRemaining] =
|
|
31552
|
-
const resolvedRef =
|
|
31553
|
-
|
|
31688
|
+
const [remaining, setRemaining] = useState38(Math.max(1, seconds));
|
|
31689
|
+
const resolvedRef = useRef36(false);
|
|
31690
|
+
useEffect65(() => {
|
|
31554
31691
|
const id = setInterval(() => {
|
|
31555
31692
|
setRemaining((prev) => {
|
|
31556
31693
|
if (prev <= 1) {
|
|
@@ -31574,7 +31711,7 @@ function RefineCountdownPanel({
|
|
|
31574
31711
|
else onDecision("skip");
|
|
31575
31712
|
});
|
|
31576
31713
|
const preview = wrapRefinementPreview(original, 60, 2);
|
|
31577
|
-
return /* @__PURE__ */
|
|
31714
|
+
return /* @__PURE__ */ jsxs61(
|
|
31578
31715
|
Box,
|
|
31579
31716
|
{
|
|
31580
31717
|
alignSelf: "stretch",
|
|
@@ -31584,41 +31721,41 @@ function RefineCountdownPanel({
|
|
|
31584
31721
|
borderColor: theme.brand,
|
|
31585
31722
|
paddingX: 1,
|
|
31586
31723
|
children: [
|
|
31587
|
-
/* @__PURE__ */
|
|
31588
|
-
/* @__PURE__ */
|
|
31724
|
+
/* @__PURE__ */ jsxs61(Box, { height: 1, children: [
|
|
31725
|
+
/* @__PURE__ */ jsxs61(Text, { color: theme.brand, bold: true, children: [
|
|
31589
31726
|
glyphs.brain,
|
|
31590
31727
|
" PROMPT REFINER"
|
|
31591
31728
|
] }),
|
|
31592
|
-
providerId && model ? /* @__PURE__ */
|
|
31729
|
+
providerId && model ? /* @__PURE__ */ jsxs61(Text, { color: theme.textMuted, children: [
|
|
31593
31730
|
" ",
|
|
31594
31731
|
"on ",
|
|
31595
31732
|
providerId,
|
|
31596
31733
|
"/",
|
|
31597
31734
|
model
|
|
31598
31735
|
] }) : null,
|
|
31599
|
-
/* @__PURE__ */
|
|
31600
|
-
/* @__PURE__ */
|
|
31736
|
+
/* @__PURE__ */ jsx63(Box, { flexGrow: 1 }),
|
|
31737
|
+
/* @__PURE__ */ jsxs61(Text, { color: theme.brand, children: [
|
|
31601
31738
|
"refining in ",
|
|
31602
31739
|
remaining,
|
|
31603
31740
|
"s\u2026"
|
|
31604
31741
|
] })
|
|
31605
31742
|
] }),
|
|
31606
|
-
/* @__PURE__ */
|
|
31607
|
-
/* @__PURE__ */
|
|
31608
|
-
/* @__PURE__ */
|
|
31743
|
+
/* @__PURE__ */ jsx63(Box, { flexDirection: "column", marginTop: 1, children: preview.map((line, index) => /* @__PURE__ */ jsxs61(Box, { height: 1, children: [
|
|
31744
|
+
/* @__PURE__ */ jsx63(Text, { color: theme.brand, children: "\u258E" }),
|
|
31745
|
+
/* @__PURE__ */ jsxs61(Text, { color: theme.textSecondary, children: [
|
|
31609
31746
|
" ",
|
|
31610
31747
|
line
|
|
31611
31748
|
] })
|
|
31612
31749
|
] }, `refine-countdown-preview-${index}`)) }),
|
|
31613
|
-
/* @__PURE__ */
|
|
31750
|
+
/* @__PURE__ */ jsx63(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx63(Text, { color: theme.textMuted, children: "Enter refines now \xB7 any key sends as-is \xB7 Esc cancels" }) })
|
|
31614
31751
|
]
|
|
31615
31752
|
}
|
|
31616
31753
|
);
|
|
31617
31754
|
}
|
|
31618
31755
|
|
|
31619
31756
|
// src/components/refine-failure-panel.tsx
|
|
31620
|
-
import { useState as
|
|
31621
|
-
import { jsx as
|
|
31757
|
+
import { useState as useState39, useMemo as useMemo12 } from "react";
|
|
31758
|
+
import { jsx as jsx64, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
31622
31759
|
function filterRefineModels(models, query) {
|
|
31623
31760
|
const normalized = query.trim().toLowerCase();
|
|
31624
31761
|
if (!normalized) return models;
|
|
@@ -31640,9 +31777,9 @@ function RefineFailurePanel({
|
|
|
31640
31777
|
onDecision
|
|
31641
31778
|
}) {
|
|
31642
31779
|
const columns = useColumns();
|
|
31643
|
-
const [view, setView] =
|
|
31644
|
-
const [cursor, setCursor] =
|
|
31645
|
-
const [query, setQuery] =
|
|
31780
|
+
const [view, setView] = useState39("options");
|
|
31781
|
+
const [cursor, setCursor] = useState39(0);
|
|
31782
|
+
const [query, setQuery] = useState39("");
|
|
31646
31783
|
const filteredModels = useMemo12(() => filterRefineModels(models, query), [models, query]);
|
|
31647
31784
|
const width = Math.max(30, columns - 4);
|
|
31648
31785
|
const canPick = models.length > 0;
|
|
@@ -31711,7 +31848,7 @@ function RefineFailurePanel({
|
|
|
31711
31848
|
);
|
|
31712
31849
|
const windowStart = Math.max(0, start);
|
|
31713
31850
|
const visible = filteredModels.slice(windowStart, windowStart + PICK_WINDOW);
|
|
31714
|
-
return /* @__PURE__ */
|
|
31851
|
+
return /* @__PURE__ */ jsxs62(
|
|
31715
31852
|
Box,
|
|
31716
31853
|
{
|
|
31717
31854
|
alignSelf: "stretch",
|
|
@@ -31721,34 +31858,34 @@ function RefineFailurePanel({
|
|
|
31721
31858
|
borderColor: theme.accent,
|
|
31722
31859
|
paddingX: 1,
|
|
31723
31860
|
children: [
|
|
31724
|
-
/* @__PURE__ */
|
|
31725
|
-
/* @__PURE__ */
|
|
31861
|
+
/* @__PURE__ */ jsxs62(Box, { height: 1, children: [
|
|
31862
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.accent, bold: true, children: [
|
|
31726
31863
|
glyphs.brain,
|
|
31727
31864
|
" RETRY REFINEMENT ON"
|
|
31728
31865
|
] }),
|
|
31729
|
-
/* @__PURE__ */
|
|
31730
|
-
/* @__PURE__ */
|
|
31866
|
+
/* @__PURE__ */ jsx64(Box, { flexGrow: 1 }),
|
|
31867
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
|
|
31731
31868
|
query ? `${total}/${models.length}` : `${models.length}`,
|
|
31732
31869
|
" model",
|
|
31733
31870
|
(query ? total : models.length) === 1 ? "" : "s"
|
|
31734
31871
|
] })
|
|
31735
31872
|
] }),
|
|
31736
|
-
/* @__PURE__ */
|
|
31737
|
-
total === 0 ? /* @__PURE__ */
|
|
31873
|
+
/* @__PURE__ */ jsx64(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: query ? `\u{1F50D} ${query} ` : "\u{1F50D} type to filter" }) }),
|
|
31874
|
+
total === 0 ? /* @__PURE__ */ jsx64(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
|
|
31738
31875
|
'(no models match "',
|
|
31739
31876
|
query,
|
|
31740
31877
|
'")'
|
|
31741
|
-
] }) }) : /* @__PURE__ */
|
|
31878
|
+
] }) }) : /* @__PURE__ */ jsx64(Box, { flexDirection: "column", marginTop: 1, children: visible.map((m, i) => {
|
|
31742
31879
|
const idx = windowStart + i;
|
|
31743
31880
|
const selected = idx === cursor;
|
|
31744
31881
|
const label = m.label && m.label !== m.model ? ` ${m.label}` : "";
|
|
31745
|
-
return /* @__PURE__ */
|
|
31746
|
-
/* @__PURE__ */
|
|
31747
|
-
/* @__PURE__ */
|
|
31748
|
-
/* @__PURE__ */
|
|
31882
|
+
return /* @__PURE__ */ jsxs62(Box, { height: 1, children: [
|
|
31883
|
+
/* @__PURE__ */ jsx64(Text, { color: selected ? theme.accent : theme.textMuted, children: selected ? "\u25B8 " : " " }),
|
|
31884
|
+
/* @__PURE__ */ jsx64(Text, { color: selected ? theme.textPrimary : theme.textSecondary, children: `${m.providerId}/${m.model}` }),
|
|
31885
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: label })
|
|
31749
31886
|
] }, `${m.providerId}/${m.model}`);
|
|
31750
31887
|
}) }),
|
|
31751
|
-
/* @__PURE__ */
|
|
31888
|
+
/* @__PURE__ */ jsx64(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
|
|
31752
31889
|
"\u2191/\u2193 choose \xB7 Enter refine \xB7 ",
|
|
31753
31890
|
query ? "Esc clear \xB7 " : "",
|
|
31754
31891
|
"Esc back"
|
|
@@ -31759,7 +31896,7 @@ function RefineFailurePanel({
|
|
|
31759
31896
|
}
|
|
31760
31897
|
const preview = original.replace(/\s+/g, " ").trim();
|
|
31761
31898
|
const previewShown = preview.length > width - 6 ? `${preview.slice(0, width - 7)}\u2026` : preview;
|
|
31762
|
-
return /* @__PURE__ */
|
|
31899
|
+
return /* @__PURE__ */ jsxs62(
|
|
31763
31900
|
Box,
|
|
31764
31901
|
{
|
|
31765
31902
|
alignSelf: "stretch",
|
|
@@ -31769,77 +31906,77 @@ function RefineFailurePanel({
|
|
|
31769
31906
|
borderColor: theme.error,
|
|
31770
31907
|
paddingX: 1,
|
|
31771
31908
|
children: [
|
|
31772
|
-
/* @__PURE__ */
|
|
31773
|
-
/* @__PURE__ */
|
|
31909
|
+
/* @__PURE__ */ jsxs62(Box, { height: 1, children: [
|
|
31910
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.error, bold: true, children: [
|
|
31774
31911
|
glyphs.warning,
|
|
31775
31912
|
" REFINEMENT FAILED"
|
|
31776
31913
|
] }),
|
|
31777
|
-
/* @__PURE__ */
|
|
31778
|
-
/* @__PURE__ */
|
|
31914
|
+
/* @__PURE__ */ jsx64(Box, { flexGrow: 1 }),
|
|
31915
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
|
|
31779
31916
|
"after ",
|
|
31780
31917
|
formatRefinementDuration(elapsedMs)
|
|
31781
31918
|
] })
|
|
31782
31919
|
] }),
|
|
31783
|
-
error ? /* @__PURE__ */
|
|
31784
|
-
/* @__PURE__ */
|
|
31785
|
-
/* @__PURE__ */
|
|
31786
|
-
/* @__PURE__ */
|
|
31787
|
-
/* @__PURE__ */
|
|
31788
|
-
/* @__PURE__ */
|
|
31920
|
+
error ? /* @__PURE__ */ jsx64(Box, { height: 1, children: /* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: error.length > width ? `${error.slice(0, width - 1)}\u2026` : error }) }) : null,
|
|
31921
|
+
/* @__PURE__ */ jsxs62(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
31922
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: "YOUR MESSAGE" }),
|
|
31923
|
+
/* @__PURE__ */ jsxs62(Box, { height: 1, children: [
|
|
31924
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.brand, children: "\u258E" }),
|
|
31925
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.textSecondary, children: [
|
|
31789
31926
|
" ",
|
|
31790
31927
|
previewShown
|
|
31791
31928
|
] })
|
|
31792
31929
|
] })
|
|
31793
31930
|
] }),
|
|
31794
|
-
/* @__PURE__ */
|
|
31795
|
-
/* @__PURE__ */
|
|
31796
|
-
/* @__PURE__ */
|
|
31797
|
-
/* @__PURE__ */
|
|
31931
|
+
/* @__PURE__ */ jsxs62(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
31932
|
+
/* @__PURE__ */ jsxs62(Box, { height: 1, gap: 2, children: [
|
|
31933
|
+
/* @__PURE__ */ jsxs62(Text, { children: [
|
|
31934
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.accent, bold: true, children: [
|
|
31798
31935
|
" ",
|
|
31799
31936
|
"Enter",
|
|
31800
31937
|
" "
|
|
31801
31938
|
] }),
|
|
31802
|
-
/* @__PURE__ */
|
|
31939
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: " retry (more time)" })
|
|
31803
31940
|
] }),
|
|
31804
|
-
canFallback ? /* @__PURE__ */
|
|
31805
|
-
/* @__PURE__ */
|
|
31941
|
+
canFallback ? /* @__PURE__ */ jsxs62(Text, { children: [
|
|
31942
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.success, bold: true, children: [
|
|
31806
31943
|
" ",
|
|
31807
31944
|
"M",
|
|
31808
31945
|
" "
|
|
31809
31946
|
] }),
|
|
31810
|
-
/* @__PURE__ */
|
|
31947
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.textMuted, children: [
|
|
31811
31948
|
" ",
|
|
31812
31949
|
fallbackRef
|
|
31813
31950
|
] })
|
|
31814
31951
|
] }) : null
|
|
31815
31952
|
] }),
|
|
31816
|
-
/* @__PURE__ */
|
|
31817
|
-
canPick ? /* @__PURE__ */
|
|
31818
|
-
/* @__PURE__ */
|
|
31953
|
+
/* @__PURE__ */ jsxs62(Box, { height: 1, gap: 2, children: [
|
|
31954
|
+
canPick ? /* @__PURE__ */ jsxs62(Text, { children: [
|
|
31955
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.warn, bold: true, children: [
|
|
31819
31956
|
" ",
|
|
31820
31957
|
"P",
|
|
31821
31958
|
" "
|
|
31822
31959
|
] }),
|
|
31823
|
-
/* @__PURE__ */
|
|
31960
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: " another model\u2026" })
|
|
31824
31961
|
] }) : null,
|
|
31825
|
-
/* @__PURE__ */
|
|
31826
|
-
/* @__PURE__ */
|
|
31962
|
+
/* @__PURE__ */ jsxs62(Text, { children: [
|
|
31963
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.textPrimary, bold: true, children: [
|
|
31827
31964
|
" ",
|
|
31828
31965
|
"S",
|
|
31829
31966
|
" "
|
|
31830
31967
|
] }),
|
|
31831
|
-
/* @__PURE__ */
|
|
31968
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: " send as-is" })
|
|
31832
31969
|
] }),
|
|
31833
|
-
/* @__PURE__ */
|
|
31834
|
-
/* @__PURE__ */
|
|
31970
|
+
/* @__PURE__ */ jsxs62(Text, { children: [
|
|
31971
|
+
/* @__PURE__ */ jsxs62(Text, { color: theme.warn, bold: true, children: [
|
|
31835
31972
|
" ",
|
|
31836
31973
|
"E",
|
|
31837
31974
|
" "
|
|
31838
31975
|
] }),
|
|
31839
|
-
/* @__PURE__ */
|
|
31976
|
+
/* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: " edit" })
|
|
31840
31977
|
] })
|
|
31841
31978
|
] }),
|
|
31842
|
-
/* @__PURE__ */
|
|
31979
|
+
/* @__PURE__ */ jsx64(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx64(Text, { color: theme.textMuted, children: "Esc sends your message as-is" }) })
|
|
31843
31980
|
] })
|
|
31844
31981
|
]
|
|
31845
31982
|
}
|
|
@@ -31847,7 +31984,7 @@ function RefineFailurePanel({
|
|
|
31847
31984
|
}
|
|
31848
31985
|
|
|
31849
31986
|
// src/components/resume-picker.tsx
|
|
31850
|
-
import { jsx as
|
|
31987
|
+
import { jsx as jsx65, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
31851
31988
|
function ResumePicker({
|
|
31852
31989
|
sessions,
|
|
31853
31990
|
selected,
|
|
@@ -31855,11 +31992,11 @@ function ResumePicker({
|
|
|
31855
31992
|
error,
|
|
31856
31993
|
hint
|
|
31857
31994
|
}) {
|
|
31858
|
-
return /* @__PURE__ */
|
|
31859
|
-
/* @__PURE__ */
|
|
31860
|
-
/* @__PURE__ */
|
|
31861
|
-
error ? /* @__PURE__ */
|
|
31862
|
-
sessions.length === 0 && !busy ? /* @__PURE__ */
|
|
31995
|
+
return /* @__PURE__ */ jsxs63(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
31996
|
+
/* @__PURE__ */ jsx65(Text, { color: "cyan", bold: true, children: "\u2501\u2501 Resume Session \u2501\u2501" }),
|
|
31997
|
+
/* @__PURE__ */ jsx65(Text, { dimColor: true, children: busy ? "Resuming selected session\u2026" : "\u2191/\u2193 navigate \xB7 Enter select \xB7 Esc cancel" }),
|
|
31998
|
+
error ? /* @__PURE__ */ jsx65(Text, { color: "red", children: error }) : null,
|
|
31999
|
+
sessions.length === 0 && !busy ? /* @__PURE__ */ jsx65(Text, { dimColor: true, children: "No sessions found." }) : sessions.map((s2, i) => {
|
|
31863
32000
|
const isCurrent = s2.isCurrent;
|
|
31864
32001
|
const isSelected = i === selected;
|
|
31865
32002
|
const date = (s2.lastActivityAt ?? s2.startedAt).slice(0, 16).replace("T", " ");
|
|
@@ -31868,8 +32005,8 @@ function ResumePicker({
|
|
|
31868
32005
|
const outcomeBadge2 = s2.outcome === "completed" ? "\u2713 " : s2.outcome === "aborted" ? "\u26A0 " : s2.outcome === "error" ? "\u2717 " : s2.outcome === "timeout" ? "\u23F1 " : " ";
|
|
31869
32006
|
const toolStr = s2.toolCallCount > 0 ? `${s2.toolCallCount} tool${s2.toolCallCount === 1 ? "" : "s"}` : "";
|
|
31870
32007
|
const iterStr = s2.iterationCount > 0 ? `${s2.iterationCount} iter${s2.iterationCount === 1 ? "" : "s"}` : "";
|
|
31871
|
-
return /* @__PURE__ */
|
|
31872
|
-
/* @__PURE__ */
|
|
32008
|
+
return /* @__PURE__ */ jsxs63(Box, { flexDirection: "column", children: [
|
|
32009
|
+
/* @__PURE__ */ jsxs63(
|
|
31873
32010
|
Text,
|
|
31874
32011
|
{
|
|
31875
32012
|
inverse: isSelected,
|
|
@@ -31877,9 +32014,9 @@ function ResumePicker({
|
|
|
31877
32014
|
...isSelected ? { color: isCurrent ? "gray" : "cyan" } : {},
|
|
31878
32015
|
children: [
|
|
31879
32016
|
isSelected ? "\u203A " : " ",
|
|
31880
|
-
/* @__PURE__ */
|
|
31881
|
-
isCurrent ? /* @__PURE__ */
|
|
31882
|
-
/* @__PURE__ */
|
|
32017
|
+
/* @__PURE__ */ jsx65(Text, { bold: true, dimColor: isCurrent ?? false, children: displayName3 }),
|
|
32018
|
+
isCurrent ? /* @__PURE__ */ jsx65(Text, { dimColor: true, children: " (current)" }) : null,
|
|
32019
|
+
/* @__PURE__ */ jsxs63(Text, { dimColor: true, children: [
|
|
31883
32020
|
" \xB7 ",
|
|
31884
32021
|
s2.id,
|
|
31885
32022
|
" \xB7 ",
|
|
@@ -31888,7 +32025,7 @@ function ResumePicker({
|
|
|
31888
32025
|
]
|
|
31889
32026
|
}
|
|
31890
32027
|
),
|
|
31891
|
-
/* @__PURE__ */
|
|
32028
|
+
/* @__PURE__ */ jsxs63(Text, { dimColor: true, children: [
|
|
31892
32029
|
isSelected ? " " : " ",
|
|
31893
32030
|
outcomeBadge2,
|
|
31894
32031
|
s2.tokenTotal.toLocaleString(),
|
|
@@ -31896,19 +32033,19 @@ function ResumePicker({
|
|
|
31896
32033
|
(s2.messageCount ?? 0) > 0 ? ` \xB7 ${s2.messageCount} msg` : "",
|
|
31897
32034
|
toolStr ? ` \xB7 ${toolStr}` : "",
|
|
31898
32035
|
iterStr ? ` \xB7 ${iterStr}` : "",
|
|
31899
|
-
s2.toolErrorCount > 0 ? /* @__PURE__ */
|
|
32036
|
+
s2.toolErrorCount > 0 ? /* @__PURE__ */ jsxs63(Text, { color: "yellow", children: [
|
|
31900
32037
|
" \xB7 ",
|
|
31901
32038
|
s2.toolErrorCount,
|
|
31902
32039
|
" err"
|
|
31903
32040
|
] }) : null
|
|
31904
32041
|
] }),
|
|
31905
|
-
/* @__PURE__ */
|
|
32042
|
+
/* @__PURE__ */ jsxs63(Text, { dimColor: true, children: [
|
|
31906
32043
|
isSelected ? " " : " ",
|
|
31907
32044
|
(contentPreview ?? s2.title).length > 72 ? `${(contentPreview ?? s2.title).slice(0, 71)}\u2026` : contentPreview ?? s2.title
|
|
31908
32045
|
] })
|
|
31909
32046
|
] }, s2.id);
|
|
31910
32047
|
}),
|
|
31911
|
-
hint ? /* @__PURE__ */
|
|
32048
|
+
hint ? /* @__PURE__ */ jsx65(Text, { color: "yellow", children: hint }) : null
|
|
31912
32049
|
] });
|
|
31913
32050
|
}
|
|
31914
32051
|
|
|
@@ -31916,11 +32053,11 @@ function ResumePicker({
|
|
|
31916
32053
|
import {
|
|
31917
32054
|
memo as memo3,
|
|
31918
32055
|
useCallback as useCallback25,
|
|
31919
|
-
useEffect as
|
|
32056
|
+
useEffect as useEffect68,
|
|
31920
32057
|
useLayoutEffect as useLayoutEffect2,
|
|
31921
32058
|
useMemo as useMemo14,
|
|
31922
|
-
useRef as
|
|
31923
|
-
useState as
|
|
32059
|
+
useRef as useRef38,
|
|
32060
|
+
useState as useState41
|
|
31924
32061
|
} from "react";
|
|
31925
32062
|
|
|
31926
32063
|
// src/height-cache.ts
|
|
@@ -32259,7 +32396,7 @@ function planPinned(geometry, extraRows = 0) {
|
|
|
32259
32396
|
|
|
32260
32397
|
// src/components/entry-error-boundary.tsx
|
|
32261
32398
|
import { Component } from "react";
|
|
32262
|
-
import { jsx as
|
|
32399
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
32263
32400
|
var EntryErrorBoundary = class extends Component {
|
|
32264
32401
|
state = { error: null };
|
|
32265
32402
|
static getDerivedStateFromError(error) {
|
|
@@ -32286,7 +32423,7 @@ var EntryErrorBoundary = class extends Component {
|
|
|
32286
32423
|
if (error) {
|
|
32287
32424
|
const label = this.props.label ? ` (${this.props.label})` : "";
|
|
32288
32425
|
const message = error.message || String(error);
|
|
32289
|
-
return /* @__PURE__ */
|
|
32426
|
+
return /* @__PURE__ */ jsx66(Box, { children: /* @__PURE__ */ jsx66(Text, { color: theme.error, children: `\u26A0 render error${label}: ${message}` }) });
|
|
32290
32427
|
}
|
|
32291
32428
|
return this.props.children;
|
|
32292
32429
|
}
|
|
@@ -32355,7 +32492,7 @@ function isCopyableEntry(_entry) {
|
|
|
32355
32492
|
}
|
|
32356
32493
|
|
|
32357
32494
|
// src/components/history/tool-group.tsx
|
|
32358
|
-
import { Fragment as Fragment21, jsx as
|
|
32495
|
+
import { Fragment as Fragment21, jsx as jsx67, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
32359
32496
|
var MAX_TOOL_GROUP_ENTRIES = 12;
|
|
32360
32497
|
var STRUCTURED_DIFF_TOOLS = /* @__PURE__ */ new Set(["edit", "write", "replace", "diff", "patch"]);
|
|
32361
32498
|
function hasInjectedMemory(entry) {
|
|
@@ -32520,15 +32657,15 @@ function ToolGroupHeader({
|
|
|
32520
32657
|
const metaBudget = meta ? Math.min(displayWidth(meta), Math.floor(tailBudget * 0.36)) : 0;
|
|
32521
32658
|
const railColor = allOk ? theme.borderSubtle : theme.error;
|
|
32522
32659
|
const countLabel = `\xD7${totalCount}`;
|
|
32523
|
-
return /* @__PURE__ */
|
|
32524
|
-
/* @__PURE__ */
|
|
32525
|
-
/* @__PURE__ */
|
|
32526
|
-
/* @__PURE__ */
|
|
32527
|
-
/* @__PURE__ */
|
|
32528
|
-
/* @__PURE__ */
|
|
32529
|
-
/* @__PURE__ */
|
|
32530
|
-
metaBudget >= 2 ? /* @__PURE__ */
|
|
32531
|
-
failCount > 0 ? /* @__PURE__ */
|
|
32660
|
+
return /* @__PURE__ */ jsx67(Box, { flexDirection: "column", marginY: 0, children: /* @__PURE__ */ jsxs64(Text, { children: [
|
|
32661
|
+
/* @__PURE__ */ jsx67(Text, { color: railColor, children: "\u256D\u2500 " }),
|
|
32662
|
+
/* @__PURE__ */ jsx67(Text, { color, children: glyph2 }),
|
|
32663
|
+
/* @__PURE__ */ jsx67(Text, { children: " " }),
|
|
32664
|
+
/* @__PURE__ */ jsx67(Text, { bold: true, color: theme.textPrimary, children: name }),
|
|
32665
|
+
/* @__PURE__ */ jsx67(Text, { children: " " }),
|
|
32666
|
+
/* @__PURE__ */ jsx67(Text, { bold: true, color: theme.textSecondary, children: countLabel }),
|
|
32667
|
+
metaBudget >= 2 ? /* @__PURE__ */ jsx67(Text, { color: theme.textMuted, children: ` \xB7 ${meta}` }) : null,
|
|
32668
|
+
failCount > 0 ? /* @__PURE__ */ jsx67(Text, { color: theme.error, children: ` \u2717${failCount}` }) : null
|
|
32532
32669
|
] }) });
|
|
32533
32670
|
}
|
|
32534
32671
|
function ToolGroup({
|
|
@@ -32538,8 +32675,8 @@ function ToolGroup({
|
|
|
32538
32675
|
const { name, entries, totalDurationMs, okCount: _okCount, failCount } = data;
|
|
32539
32676
|
const railColor = failCount === 0 ? theme.borderSubtle : theme.error;
|
|
32540
32677
|
const toolContentWidth = Math.max(20, termWidth - 2);
|
|
32541
|
-
return /* @__PURE__ */
|
|
32542
|
-
/* @__PURE__ */
|
|
32678
|
+
return /* @__PURE__ */ jsxs64(Box, { flexDirection: "column", marginY: 0, children: [
|
|
32679
|
+
/* @__PURE__ */ jsx67(
|
|
32543
32680
|
ToolGroupHeader,
|
|
32544
32681
|
{
|
|
32545
32682
|
name,
|
|
@@ -32549,7 +32686,7 @@ function ToolGroup({
|
|
|
32549
32686
|
termWidth
|
|
32550
32687
|
}
|
|
32551
32688
|
),
|
|
32552
|
-
/* @__PURE__ */
|
|
32689
|
+
/* @__PURE__ */ jsx67(
|
|
32553
32690
|
Box,
|
|
32554
32691
|
{
|
|
32555
32692
|
flexDirection: "column",
|
|
@@ -32561,7 +32698,7 @@ function ToolGroup({
|
|
|
32561
32698
|
paddingLeft: 1,
|
|
32562
32699
|
children: entries.map((entry, idx) => {
|
|
32563
32700
|
if (entry.kind !== "tool") return null;
|
|
32564
|
-
return /* @__PURE__ */
|
|
32701
|
+
return /* @__PURE__ */ jsx67(
|
|
32565
32702
|
ToolGroupItem,
|
|
32566
32703
|
{
|
|
32567
32704
|
entry,
|
|
@@ -32573,7 +32710,7 @@ function ToolGroup({
|
|
|
32573
32710
|
})
|
|
32574
32711
|
}
|
|
32575
32712
|
),
|
|
32576
|
-
/* @__PURE__ */
|
|
32713
|
+
/* @__PURE__ */ jsx67(Text, { color: railColor, children: `\u2570${"\u2500".repeat(Math.max(2, termWidth - 1))}` })
|
|
32577
32714
|
] });
|
|
32578
32715
|
}
|
|
32579
32716
|
function ToolGroupItem({
|
|
@@ -32596,24 +32733,24 @@ function ToolGroupItem({
|
|
|
32596
32733
|
const argBudget = Math.max(8, contentWidth - prefixWidth - metaWidth);
|
|
32597
32734
|
const rawArg = formatToolArgs(entry.name, entry.input);
|
|
32598
32735
|
const argPreview = displayWidth(rawArg) > argBudget ? `\u2026${rawArg.slice(-(argBudget - 1))}` : rawArg;
|
|
32599
|
-
return /* @__PURE__ */
|
|
32600
|
-
/* @__PURE__ */
|
|
32601
|
-
/* @__PURE__ */
|
|
32602
|
-
argPreview ? /* @__PURE__ */
|
|
32603
|
-
/* @__PURE__ */
|
|
32604
|
-
/* @__PURE__ */
|
|
32736
|
+
return /* @__PURE__ */ jsxs64(Text, { children: [
|
|
32737
|
+
/* @__PURE__ */ jsx67(Text, { bold: true, color: statusColor2, children: statusMark }),
|
|
32738
|
+
/* @__PURE__ */ jsx67(Text, { dimColor: true, children: ` #${index}` }),
|
|
32739
|
+
argPreview ? /* @__PURE__ */ jsxs64(Fragment21, { children: [
|
|
32740
|
+
/* @__PURE__ */ jsx67(Text, { children: " " }),
|
|
32741
|
+
/* @__PURE__ */ jsx67(Text, { color: theme.textSecondary, children: argPreview })
|
|
32605
32742
|
] }) : null,
|
|
32606
|
-
metaStr ? /* @__PURE__ */
|
|
32743
|
+
metaStr ? /* @__PURE__ */ jsx67(Text, { dimColor: true, children: ` \xB7 ${metaStr}` }) : null
|
|
32607
32744
|
] });
|
|
32608
32745
|
}
|
|
32609
32746
|
|
|
32610
32747
|
// src/components/history/index.tsx
|
|
32611
|
-
import { memo as memo2, useEffect as
|
|
32748
|
+
import { memo as memo2, useEffect as useEffect67, useRef as useRef37, useState as useState40 } from "react";
|
|
32612
32749
|
|
|
32613
32750
|
// src/components/history/entry.tsx
|
|
32614
32751
|
import { hasOpenTodos } from "@wrongstack/core/utils";
|
|
32615
32752
|
import { parseNextSteps } from "@wrongstack/tools/next-steps";
|
|
32616
|
-
import React8, { useEffect as
|
|
32753
|
+
import React8, { useEffect as useEffect66, useMemo as useMemo13 } from "react";
|
|
32617
32754
|
|
|
32618
32755
|
// src/markdown-table.ts
|
|
32619
32756
|
import { expectDefined as expectDefined4 } from "@wrongstack/core/utils";
|
|
@@ -32957,7 +33094,7 @@ function padCell(text, width, align) {
|
|
|
32957
33094
|
}
|
|
32958
33095
|
|
|
32959
33096
|
// src/markdown.tsx
|
|
32960
|
-
import { jsx as
|
|
33097
|
+
import { jsx as jsx68, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32961
33098
|
var _parseCache = /* @__PURE__ */ new Map();
|
|
32962
33099
|
var _PARSE_CACHE_MAX_ENTRIES = 5e3;
|
|
32963
33100
|
var _PARSE_CACHE_MAX_CHARS = 512 * 1024;
|
|
@@ -33076,8 +33213,8 @@ function parseInline(text) {
|
|
|
33076
33213
|
return tokens;
|
|
33077
33214
|
}
|
|
33078
33215
|
function InlineLine({ tokens, dim }) {
|
|
33079
|
-
if (tokens.length === 0) return /* @__PURE__ */
|
|
33080
|
-
return /* @__PURE__ */
|
|
33216
|
+
if (tokens.length === 0) return /* @__PURE__ */ jsx68(Text, { children: " " });
|
|
33217
|
+
return /* @__PURE__ */ jsx68(Text, { children: tokens.map((t, j) => /* @__PURE__ */ jsx68(
|
|
33081
33218
|
Text,
|
|
33082
33219
|
{
|
|
33083
33220
|
color: t.code ? theme.accent : t.link ? theme.accent : "white",
|
|
@@ -33110,7 +33247,7 @@ function MarkdownView({
|
|
|
33110
33247
|
if (tableEnd > i) {
|
|
33111
33248
|
const tableText = renderTable(lines.slice(i, tableEnd), tableBudget);
|
|
33112
33249
|
rows.push(
|
|
33113
|
-
/* @__PURE__ */
|
|
33250
|
+
/* @__PURE__ */ jsx68(Box, { width: tableBudget, backgroundColor: "transparent", children: /* @__PURE__ */ jsx68(Text, { children: tableText }) }, `t${key++}`)
|
|
33114
33251
|
);
|
|
33115
33252
|
i = tableEnd;
|
|
33116
33253
|
continue;
|
|
@@ -33120,7 +33257,7 @@ function MarkdownView({
|
|
|
33120
33257
|
const heading = line.match(HEADING_RE);
|
|
33121
33258
|
if (heading) {
|
|
33122
33259
|
rows.push(
|
|
33123
|
-
/* @__PURE__ */
|
|
33260
|
+
/* @__PURE__ */ jsx68(Text, { bold: true, color: theme.accent, children: heading[2] ?? "" }, `h${key++}`)
|
|
33124
33261
|
);
|
|
33125
33262
|
continue;
|
|
33126
33263
|
}
|
|
@@ -33128,13 +33265,13 @@ function MarkdownView({
|
|
|
33128
33265
|
if (quote && line.startsWith(">")) {
|
|
33129
33266
|
const qContent = quote[1] ?? "";
|
|
33130
33267
|
rows.push(
|
|
33131
|
-
/* @__PURE__ */
|
|
33132
|
-
/* @__PURE__ */
|
|
33268
|
+
/* @__PURE__ */ jsxs65(Box, { flexDirection: "row", children: [
|
|
33269
|
+
/* @__PURE__ */ jsx68(Text, { dimColor: true, children: " " }),
|
|
33133
33270
|
/[\u2500-\u257F]/.test(qContent) ? (
|
|
33134
33271
|
// Box-drawing characters inside blockquotes also need transparent
|
|
33135
33272
|
// background to avoid inheriting the message panel background.
|
|
33136
|
-
/* @__PURE__ */
|
|
33137
|
-
) : /* @__PURE__ */
|
|
33273
|
+
/* @__PURE__ */ jsx68(Box, { flexDirection: "row", backgroundColor: "transparent", children: [...qContent].slice(0, (contentWidth ?? termWidth) - 2).map((ch, ci) => /* @__PURE__ */ jsx68(Text, { dimColor: true, children: ch }, ci)) })
|
|
33274
|
+
) : /* @__PURE__ */ jsx68(InlineLine, { tokens: parseInline(qContent), dim: true })
|
|
33138
33275
|
] }, `q${key++}`)
|
|
33139
33276
|
);
|
|
33140
33277
|
continue;
|
|
@@ -33142,9 +33279,9 @@ function MarkdownView({
|
|
|
33142
33279
|
const bullet = line.match(BULLET_RE);
|
|
33143
33280
|
if (bullet) {
|
|
33144
33281
|
rows.push(
|
|
33145
|
-
/* @__PURE__ */
|
|
33146
|
-
/* @__PURE__ */
|
|
33147
|
-
/* @__PURE__ */
|
|
33282
|
+
/* @__PURE__ */ jsxs65(Box, { flexDirection: "row", children: [
|
|
33283
|
+
/* @__PURE__ */ jsx68(Text, { color: theme.accent, children: `${bullet[1] ?? ""}\u2022 ` }),
|
|
33284
|
+
/* @__PURE__ */ jsx68(InlineLine, { tokens: parseInline(bullet[2] ?? "") })
|
|
33148
33285
|
] }, `b${key++}`)
|
|
33149
33286
|
);
|
|
33150
33287
|
continue;
|
|
@@ -33152,9 +33289,9 @@ function MarkdownView({
|
|
|
33152
33289
|
const numbered = line.match(NUMBERED_RE);
|
|
33153
33290
|
if (numbered) {
|
|
33154
33291
|
rows.push(
|
|
33155
|
-
/* @__PURE__ */
|
|
33156
|
-
/* @__PURE__ */
|
|
33157
|
-
/* @__PURE__ */
|
|
33292
|
+
/* @__PURE__ */ jsxs65(Box, { flexDirection: "row", children: [
|
|
33293
|
+
/* @__PURE__ */ jsx68(Text, { color: theme.accent, children: `${numbered[1] ?? ""}${numbered[2]}. ` }),
|
|
33294
|
+
/* @__PURE__ */ jsx68(InlineLine, { tokens: parseInline(numbered[3] ?? "") })
|
|
33158
33295
|
] }, `n${key++}`)
|
|
33159
33296
|
);
|
|
33160
33297
|
continue;
|
|
@@ -33163,17 +33300,17 @@ function MarkdownView({
|
|
|
33163
33300
|
const maxW = contentWidth ?? termWidth;
|
|
33164
33301
|
const chars = [...line].slice(0, maxW);
|
|
33165
33302
|
rows.push(
|
|
33166
|
-
/* @__PURE__ */
|
|
33303
|
+
/* @__PURE__ */ jsx68(Box, { width: maxW, backgroundColor: "transparent", flexDirection: "row", children: chars.map((ch, ci) => /* @__PURE__ */ jsx68(Text, { children: ch }, ci)) }, `bx${key++}`)
|
|
33167
33304
|
);
|
|
33168
33305
|
continue;
|
|
33169
33306
|
}
|
|
33170
|
-
rows.push(/* @__PURE__ */
|
|
33307
|
+
rows.push(/* @__PURE__ */ jsx68(InlineLine, { tokens: parseInline(line) }, `p${key++}`));
|
|
33171
33308
|
}
|
|
33172
|
-
return /* @__PURE__ */
|
|
33309
|
+
return /* @__PURE__ */ jsx68(Box, { flexDirection: "column", width: Math.max(20, tableBudget), children: rows });
|
|
33173
33310
|
}
|
|
33174
33311
|
|
|
33175
33312
|
// src/components/history/assistant.tsx
|
|
33176
|
-
import { jsx as
|
|
33313
|
+
import { jsx as jsx69, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
33177
33314
|
var MESSAGE_PANEL_CHROME_WIDTH = 2;
|
|
33178
33315
|
function assistantContentWidth(termWidth) {
|
|
33179
33316
|
return Math.max(20, termWidth - MESSAGE_PANEL_CHROME_WIDTH);
|
|
@@ -33218,8 +33355,8 @@ function AssistantBody({
|
|
|
33218
33355
|
}) {
|
|
33219
33356
|
const segments = splitFencedBlocks(text);
|
|
33220
33357
|
const inner = contentWidth ?? termWidth;
|
|
33221
|
-
return /* @__PURE__ */
|
|
33222
|
-
(seg, i) => seg.type === "code" ? /* @__PURE__ */
|
|
33358
|
+
return /* @__PURE__ */ jsx69(Box, { flexDirection: "column", children: segments.map(
|
|
33359
|
+
(seg, i) => seg.type === "code" ? /* @__PURE__ */ jsx69(CodeBlock, { code: seg.text, lang: seg.lang ?? "plain", contentWidth: inner }, i) : /* @__PURE__ */ jsx69(
|
|
33223
33360
|
MarkdownView,
|
|
33224
33361
|
{
|
|
33225
33362
|
text: seg.text,
|
|
@@ -33236,7 +33373,7 @@ var ASSISTANT_TAIL_HEADER_ROWS = 1;
|
|
|
33236
33373
|
var ASSISTANT_TAIL_HEIGHT = ASSISTANT_TAIL_MARGIN_Y + ASSISTANT_TAIL_HEADER_ROWS + ASSISTANT_TAIL_LINES;
|
|
33237
33374
|
|
|
33238
33375
|
// src/components/history/banner.tsx
|
|
33239
|
-
import { Fragment as Fragment22, jsx as
|
|
33376
|
+
import { Fragment as Fragment22, jsx as jsx70, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
33240
33377
|
var STACK_ORANGE2 = "#FD9F02";
|
|
33241
33378
|
var SIGNAL_PINK = "#FE2E5F";
|
|
33242
33379
|
var BORDER = "#3B3C36";
|
|
@@ -33275,7 +33412,7 @@ function BrandMark({ pinkRow = 1 }) {
|
|
|
33275
33412
|
return null;
|
|
33276
33413
|
})
|
|
33277
33414
|
);
|
|
33278
|
-
return /* @__PURE__ */
|
|
33415
|
+
return /* @__PURE__ */ jsx70(Box, { flexDirection: "column", alignItems: "center", children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx70(Text, { bold: true, children: row.map((color, columnIndex) => /* @__PURE__ */ jsxs67(Text, { color: color ?? void 0, children: [
|
|
33279
33416
|
color ? "\u2588\u2588" : " ",
|
|
33280
33417
|
columnIndex < row.length - 1 ? " " : ""
|
|
33281
33418
|
] }, columnIndex)) }, rowIndex)) });
|
|
@@ -33325,12 +33462,12 @@ function bannerGradientColor(position, length) {
|
|
|
33325
33462
|
return mixHex(STACK_ORANGE2, SIGNAL_PINK, progress);
|
|
33326
33463
|
}
|
|
33327
33464
|
function GradientText({ text }) {
|
|
33328
|
-
return /* @__PURE__ */
|
|
33329
|
-
(character, index) => character === " " ? " " : /* @__PURE__ */
|
|
33465
|
+
return /* @__PURE__ */ jsx70(Text, { bold: true, children: [...text].map(
|
|
33466
|
+
(character, index) => character === " " ? " " : /* @__PURE__ */ jsx70(Text, { color: bannerGradientColor(index, text.length), children: character }, index)
|
|
33330
33467
|
) });
|
|
33331
33468
|
}
|
|
33332
33469
|
function PixelWordmark() {
|
|
33333
|
-
return /* @__PURE__ */
|
|
33470
|
+
return /* @__PURE__ */ jsx70(Box, { flexDirection: "column", alignItems: "center", children: WORDMARK_LINES.map((line, row) => /* @__PURE__ */ jsx70(GradientText, { text: line }, row)) });
|
|
33334
33471
|
}
|
|
33335
33472
|
function trunc(value, width) {
|
|
33336
33473
|
if (width <= 0 || !value) return "";
|
|
@@ -33348,10 +33485,10 @@ function InfoRow({
|
|
|
33348
33485
|
const labelWidth = compact ? 6 : 9;
|
|
33349
33486
|
const valueWidth = Math.max(1, contentWidth - labelWidth - 3);
|
|
33350
33487
|
const color = accent ? STACK_ORANGE2 : MUTED;
|
|
33351
|
-
return /* @__PURE__ */
|
|
33352
|
-
/* @__PURE__ */
|
|
33353
|
-
/* @__PURE__ */
|
|
33354
|
-
/* @__PURE__ */
|
|
33488
|
+
return /* @__PURE__ */ jsxs67(Text, { children: [
|
|
33489
|
+
/* @__PURE__ */ jsx70(Text, { color, children: icon }),
|
|
33490
|
+
/* @__PURE__ */ jsx70(Text, { color, bold: true, children: ` ${trunc(label, labelWidth).padEnd(labelWidth)} ` }),
|
|
33491
|
+
/* @__PURE__ */ jsx70(Text, { color: accent ? TEXT : MUTED, children: trunc(value, valueWidth) })
|
|
33355
33492
|
] });
|
|
33356
33493
|
}
|
|
33357
33494
|
function ProfileRow({
|
|
@@ -33366,7 +33503,7 @@ function ProfileRow({
|
|
|
33366
33503
|
const icon = "\u2699";
|
|
33367
33504
|
const label = "profile";
|
|
33368
33505
|
if (!profileConfigPath) {
|
|
33369
|
-
return /* @__PURE__ */
|
|
33506
|
+
return /* @__PURE__ */ jsx70(
|
|
33370
33507
|
InfoRow,
|
|
33371
33508
|
{
|
|
33372
33509
|
icon,
|
|
@@ -33383,26 +33520,26 @@ function ProfileRow({
|
|
|
33383
33520
|
const segmentMatch = fullPath.match(/[/\\]profiles[/\\]([^/\\]+)[/\\]config\.json$/);
|
|
33384
33521
|
const profileSegment = segmentMatch?.[1] ?? "";
|
|
33385
33522
|
const segIdx = profileSegment ? displayPath.lastIndexOf(profileSegment) : -1;
|
|
33386
|
-
return /* @__PURE__ */
|
|
33387
|
-
/* @__PURE__ */
|
|
33388
|
-
/* @__PURE__ */
|
|
33389
|
-
segIdx >= 0 && profileSegment ? /* @__PURE__ */
|
|
33390
|
-
/* @__PURE__ */
|
|
33391
|
-
/* @__PURE__ */
|
|
33392
|
-
/* @__PURE__ */
|
|
33393
|
-
] }) : /* @__PURE__ */
|
|
33523
|
+
return /* @__PURE__ */ jsxs67(Text, { children: [
|
|
33524
|
+
/* @__PURE__ */ jsx70(Text, { color: STACK_ORANGE2, children: icon }),
|
|
33525
|
+
/* @__PURE__ */ jsx70(Text, { color: STACK_ORANGE2, bold: true, children: ` ${trunc(label, labelWidth).padEnd(labelWidth)} ` }),
|
|
33526
|
+
segIdx >= 0 && profileSegment ? /* @__PURE__ */ jsxs67(Fragment22, { children: [
|
|
33527
|
+
/* @__PURE__ */ jsx70(Text, { color: MUTED, children: displayPath.slice(0, segIdx) }),
|
|
33528
|
+
/* @__PURE__ */ jsx70(Text, { color: STACK_ORANGE2, bold: true, children: profileSegment }),
|
|
33529
|
+
/* @__PURE__ */ jsx70(Text, { color: MUTED, children: displayPath.slice(segIdx + profileSegment.length) })
|
|
33530
|
+
] }) : /* @__PURE__ */ jsx70(Text, { color: MUTED, children: displayPath })
|
|
33394
33531
|
] });
|
|
33395
33532
|
}
|
|
33396
33533
|
var OSC8_WRONGSTACK = "\x1B]8;;https://wrongstack.com\x1B\\wrongstack.com\x1B]8;;\x1B\\";
|
|
33397
33534
|
var OSC8_GITHUB = "\x1B]8;;https://github.com/wrongstack/wrongstack\x1B\\github\x1B]8;;\x1B\\";
|
|
33398
33535
|
function Footer({ contentWidth, compact }) {
|
|
33399
|
-
return /* @__PURE__ */
|
|
33400
|
-
/* @__PURE__ */
|
|
33401
|
-
/* @__PURE__ */
|
|
33402
|
-
!compact || contentWidth >= 35 ? /* @__PURE__ */
|
|
33403
|
-
/* @__PURE__ */
|
|
33404
|
-
/* @__PURE__ */
|
|
33405
|
-
/* @__PURE__ */
|
|
33536
|
+
return /* @__PURE__ */ jsx70(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs67(Text, { children: [
|
|
33537
|
+
/* @__PURE__ */ jsx70(Text, { color: SIGNAL_PINK, children: "\u25C6 " }),
|
|
33538
|
+
/* @__PURE__ */ jsx70(Text, { dimColor: true, children: OSC8_WRONGSTACK }),
|
|
33539
|
+
!compact || contentWidth >= 35 ? /* @__PURE__ */ jsxs67(Fragment22, { children: [
|
|
33540
|
+
/* @__PURE__ */ jsx70(Text, { dimColor: true, children: " \xB7 " }),
|
|
33541
|
+
/* @__PURE__ */ jsx70(Text, { color: STACK_ORANGE2, children: "\u2605 " }),
|
|
33542
|
+
/* @__PURE__ */ jsx70(Text, { dimColor: true, children: OSC8_GITHUB })
|
|
33406
33543
|
] }) : null
|
|
33407
33544
|
] }) });
|
|
33408
33545
|
}
|
|
@@ -33420,22 +33557,22 @@ function AutonomyAgentsSection({
|
|
|
33420
33557
|
}) {
|
|
33421
33558
|
const lookup = new Map(agents.map((a) => [a.name, a]));
|
|
33422
33559
|
const maxLabelWidth = Math.max(1, contentWidth - 4);
|
|
33423
|
-
return /* @__PURE__ */
|
|
33424
|
-
/* @__PURE__ */
|
|
33425
|
-
/* @__PURE__ */
|
|
33560
|
+
return /* @__PURE__ */ jsxs67(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
33561
|
+
/* @__PURE__ */ jsx70(Text, { color: BORDER, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }),
|
|
33562
|
+
/* @__PURE__ */ jsx70(Box, { flexDirection: "row", flexWrap: "wrap", marginTop: 0, children: AGENT_ORDER.map((name) => {
|
|
33426
33563
|
const agent = lookup.get(name);
|
|
33427
33564
|
if (!agent) return null;
|
|
33428
33565
|
const online = agent.online;
|
|
33429
33566
|
const indicator = online ? "\u25CF" : "\xB7";
|
|
33430
33567
|
const color = online ? STACK_ORANGE2 : MUTED;
|
|
33431
33568
|
const detail = agent.detail;
|
|
33432
|
-
return /* @__PURE__ */
|
|
33433
|
-
/* @__PURE__ */
|
|
33434
|
-
/* @__PURE__ */
|
|
33569
|
+
return /* @__PURE__ */ jsxs67(Box, { flexDirection: "row", marginRight: 2, children: [
|
|
33570
|
+
/* @__PURE__ */ jsx70(Text, { color, children: indicator }),
|
|
33571
|
+
/* @__PURE__ */ jsxs67(Text, { color, children: [
|
|
33435
33572
|
" ",
|
|
33436
33573
|
trunc(compact ? name.slice(0, 4) : name, compact ? 4 : 8)
|
|
33437
33574
|
] }),
|
|
33438
|
-
!compact && detail ? /* @__PURE__ */
|
|
33575
|
+
!compact && detail ? /* @__PURE__ */ jsxs67(Text, { dimColor: true, children: [
|
|
33439
33576
|
" ",
|
|
33440
33577
|
trunc(detail, Math.max(1, maxLabelWidth - 12))
|
|
33441
33578
|
] }) : null
|
|
@@ -33474,11 +33611,11 @@ function Banner({
|
|
|
33474
33611
|
Math.max(1, panelWidth - (unbordered ? 0 : 4))
|
|
33475
33612
|
);
|
|
33476
33613
|
if (unbordered) {
|
|
33477
|
-
return /* @__PURE__ */
|
|
33614
|
+
return /* @__PURE__ */ jsx70(Text, { color: STACK_ORANGE2, bold: true, children: summary });
|
|
33478
33615
|
}
|
|
33479
|
-
return /* @__PURE__ */
|
|
33616
|
+
return /* @__PURE__ */ jsx70(Box, { width: panelWidth, borderStyle: "round", borderColor: BORDER, paddingX: 1, children: /* @__PURE__ */ jsx70(Text, { color: STACK_ORANGE2, bold: true, children: summary }) });
|
|
33480
33617
|
}
|
|
33481
|
-
return /* @__PURE__ */
|
|
33618
|
+
return /* @__PURE__ */ jsxs67(
|
|
33482
33619
|
Box,
|
|
33483
33620
|
{
|
|
33484
33621
|
width: panelWidth,
|
|
@@ -33488,27 +33625,27 @@ function Banner({
|
|
|
33488
33625
|
paddingX,
|
|
33489
33626
|
paddingY: 0,
|
|
33490
33627
|
children: [
|
|
33491
|
-
/* @__PURE__ */
|
|
33492
|
-
/* @__PURE__ */
|
|
33628
|
+
/* @__PURE__ */ jsxs67(Box, { justifyContent: "flex-end", marginTop: 1, children: [
|
|
33629
|
+
/* @__PURE__ */ jsxs67(Text, { color: MUTED, children: [
|
|
33493
33630
|
"v",
|
|
33494
33631
|
version
|
|
33495
33632
|
] }),
|
|
33496
|
-
entry.updateAvailable && entry.latestVersion ? /* @__PURE__ */
|
|
33633
|
+
entry.updateAvailable && entry.latestVersion ? /* @__PURE__ */ jsxs67(Text, { color: STACK_ORANGE2, children: [
|
|
33497
33634
|
" \xB7 (update available: v",
|
|
33498
33635
|
entry.latestVersion,
|
|
33499
33636
|
")"
|
|
33500
33637
|
] }) : null
|
|
33501
33638
|
] }),
|
|
33502
|
-
/* @__PURE__ */
|
|
33503
|
-
compact ? /* @__PURE__ */
|
|
33504
|
-
/* @__PURE__ */
|
|
33505
|
-
/* @__PURE__ */
|
|
33506
|
-
] }) : /* @__PURE__ */
|
|
33507
|
-
/* @__PURE__ */
|
|
33508
|
-
/* @__PURE__ */
|
|
33639
|
+
/* @__PURE__ */ jsx70(Box, { justifyContent: "center", marginTop: compact ? 0 : 1, children: /* @__PURE__ */ jsx70(BrandMark, { pinkRow }) }),
|
|
33640
|
+
compact ? /* @__PURE__ */ jsxs67(Fragment22, { children: [
|
|
33641
|
+
/* @__PURE__ */ jsx70(Box, { justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx70(GradientText, { text: "WrongStack" }) }),
|
|
33642
|
+
/* @__PURE__ */ jsx70(Box, { justifyContent: "center", children: /* @__PURE__ */ jsx70(Text, { color: MUTED, children: trunc("TERMINAL AI ENGINE", contentWidth) }) })
|
|
33643
|
+
] }) : /* @__PURE__ */ jsxs67(Fragment22, { children: [
|
|
33644
|
+
/* @__PURE__ */ jsx70(Box, { justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx70(PixelWordmark, {}) }),
|
|
33645
|
+
/* @__PURE__ */ jsx70(Box, { justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx70(Text, { color: MUTED, italic: true, children: "BUILT ON THE WRONG STACK. SHIPPED ANYWAY." }) })
|
|
33509
33646
|
] }),
|
|
33510
|
-
/* @__PURE__ */
|
|
33511
|
-
/* @__PURE__ */
|
|
33647
|
+
/* @__PURE__ */ jsxs67(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
33648
|
+
/* @__PURE__ */ jsx70(
|
|
33512
33649
|
InfoRow,
|
|
33513
33650
|
{
|
|
33514
33651
|
icon: "\u25C6",
|
|
@@ -33519,7 +33656,7 @@ function Banner({
|
|
|
33519
33656
|
accent: true
|
|
33520
33657
|
}
|
|
33521
33658
|
),
|
|
33522
|
-
entry.family ? /* @__PURE__ */
|
|
33659
|
+
entry.family ? /* @__PURE__ */ jsx70(
|
|
33523
33660
|
InfoRow,
|
|
33524
33661
|
{
|
|
33525
33662
|
icon: "\u25C7",
|
|
@@ -33529,7 +33666,7 @@ function Banner({
|
|
|
33529
33666
|
compact
|
|
33530
33667
|
}
|
|
33531
33668
|
) : null,
|
|
33532
|
-
entry.keyTail ? /* @__PURE__ */
|
|
33669
|
+
entry.keyTail ? /* @__PURE__ */ jsx70(
|
|
33533
33670
|
InfoRow,
|
|
33534
33671
|
{
|
|
33535
33672
|
icon: "\u25C8",
|
|
@@ -33539,7 +33676,7 @@ function Banner({
|
|
|
33539
33676
|
compact
|
|
33540
33677
|
}
|
|
33541
33678
|
) : null,
|
|
33542
|
-
entry.sessionId ? /* @__PURE__ */
|
|
33679
|
+
entry.sessionId ? /* @__PURE__ */ jsx70(
|
|
33543
33680
|
InfoRow,
|
|
33544
33681
|
{
|
|
33545
33682
|
icon: "\u25C8",
|
|
@@ -33549,7 +33686,7 @@ function Banner({
|
|
|
33549
33686
|
compact
|
|
33550
33687
|
}
|
|
33551
33688
|
) : null,
|
|
33552
|
-
/* @__PURE__ */
|
|
33689
|
+
/* @__PURE__ */ jsx70(
|
|
33553
33690
|
InfoRow,
|
|
33554
33691
|
{
|
|
33555
33692
|
icon: "\u2301",
|
|
@@ -33559,7 +33696,7 @@ function Banner({
|
|
|
33559
33696
|
compact
|
|
33560
33697
|
}
|
|
33561
33698
|
),
|
|
33562
|
-
/* @__PURE__ */
|
|
33699
|
+
/* @__PURE__ */ jsx70(
|
|
33563
33700
|
ProfileRow,
|
|
33564
33701
|
{
|
|
33565
33702
|
profile: entry.profile,
|
|
@@ -33569,8 +33706,8 @@ function Banner({
|
|
|
33569
33706
|
}
|
|
33570
33707
|
)
|
|
33571
33708
|
] }),
|
|
33572
|
-
/* @__PURE__ */
|
|
33573
|
-
entry.autonomyAgents && entry.autonomyAgents.length > 0 ? /* @__PURE__ */
|
|
33709
|
+
/* @__PURE__ */ jsx70(Footer, { contentWidth, compact }),
|
|
33710
|
+
entry.autonomyAgents && entry.autonomyAgents.length > 0 ? /* @__PURE__ */ jsx70(
|
|
33574
33711
|
AutonomyAgentsSection,
|
|
33575
33712
|
{
|
|
33576
33713
|
agents: entry.autonomyAgents,
|
|
@@ -33584,7 +33721,7 @@ function Banner({
|
|
|
33584
33721
|
}
|
|
33585
33722
|
|
|
33586
33723
|
// src/components/history/tool-card.tsx
|
|
33587
|
-
import { Fragment as Fragment23, jsx as
|
|
33724
|
+
import { Fragment as Fragment23, jsx as jsx71, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
33588
33725
|
function ToolCard({
|
|
33589
33726
|
glyph: glyph2,
|
|
33590
33727
|
color,
|
|
@@ -33605,19 +33742,19 @@ function ToolCard({
|
|
|
33605
33742
|
const detailBudget = Math.max(0, tailBudget - (visibleMeta ? displayWidth(visibleMeta) + 5 : 0));
|
|
33606
33743
|
const visibleDetail = detailBudget >= 2 && detail ? truncateDisplay(detail, detailBudget) : void 0;
|
|
33607
33744
|
const railColor = ok ? theme.borderSubtle : theme.error;
|
|
33608
|
-
return /* @__PURE__ */
|
|
33609
|
-
/* @__PURE__ */
|
|
33610
|
-
/* @__PURE__ */
|
|
33611
|
-
/* @__PURE__ */
|
|
33612
|
-
/* @__PURE__ */
|
|
33613
|
-
/* @__PURE__ */
|
|
33614
|
-
/* @__PURE__ */
|
|
33615
|
-
/* @__PURE__ */
|
|
33616
|
-
visibleDetail ? /* @__PURE__ */
|
|
33617
|
-
visibleMeta ? /* @__PURE__ */
|
|
33745
|
+
return /* @__PURE__ */ jsxs68(Box, { flexDirection: "column", marginY: 0, children: [
|
|
33746
|
+
/* @__PURE__ */ jsxs68(Text, { children: [
|
|
33747
|
+
/* @__PURE__ */ jsx71(Text, { color: railColor, children: "\u256D\u2500 " }),
|
|
33748
|
+
/* @__PURE__ */ jsx71(Text, { bold: true, color: statusColor2, children: status }),
|
|
33749
|
+
/* @__PURE__ */ jsx71(Text, { children: " " }),
|
|
33750
|
+
/* @__PURE__ */ jsx71(Text, { color, children: glyph2 }),
|
|
33751
|
+
/* @__PURE__ */ jsx71(Text, { children: " " }),
|
|
33752
|
+
/* @__PURE__ */ jsx71(Text, { bold: true, color: theme.textPrimary, children: title }),
|
|
33753
|
+
visibleDetail ? /* @__PURE__ */ jsx71(Text, { color: theme.textSecondary, children: ` ${visibleDetail}` }) : null,
|
|
33754
|
+
visibleMeta ? /* @__PURE__ */ jsx71(Text, { color: theme.textMuted, children: ` \xB7 ${visibleMeta}` }) : null
|
|
33618
33755
|
] }),
|
|
33619
|
-
hasBody ? /* @__PURE__ */
|
|
33620
|
-
/* @__PURE__ */
|
|
33756
|
+
hasBody ? /* @__PURE__ */ jsxs68(Fragment23, { children: [
|
|
33757
|
+
/* @__PURE__ */ jsx71(
|
|
33621
33758
|
Box,
|
|
33622
33759
|
{
|
|
33623
33760
|
flexDirection: "column",
|
|
@@ -33630,7 +33767,7 @@ function ToolCard({
|
|
|
33630
33767
|
children
|
|
33631
33768
|
}
|
|
33632
33769
|
),
|
|
33633
|
-
/* @__PURE__ */
|
|
33770
|
+
/* @__PURE__ */ jsx71(Text, { color: railColor, children: `\u2570${"\u2500".repeat(Math.max(2, termWidth - 1))}` })
|
|
33634
33771
|
] }) : null
|
|
33635
33772
|
] });
|
|
33636
33773
|
}
|
|
@@ -33648,7 +33785,7 @@ var MEMORY_GATE_DEFAULTS = {
|
|
|
33648
33785
|
};
|
|
33649
33786
|
|
|
33650
33787
|
// src/components/history/entry.tsx
|
|
33651
|
-
import { Fragment as Fragment24, jsx as
|
|
33788
|
+
import { Fragment as Fragment24, jsx as jsx72, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
33652
33789
|
var MAX_MEMORY_PROOF_ROWS = 4;
|
|
33653
33790
|
function formatScoreTerms(terms) {
|
|
33654
33791
|
if (terms.length === 0) return "no score breakdown (emitted by an older core build)";
|
|
@@ -33713,7 +33850,7 @@ function NoticeCard({
|
|
|
33713
33850
|
const contentWidth = Math.max(20, termWidth - 4);
|
|
33714
33851
|
const hasAnsi = /\x1b\[/.test(text);
|
|
33715
33852
|
const lines = text.split("\n");
|
|
33716
|
-
return /* @__PURE__ */
|
|
33853
|
+
return /* @__PURE__ */ jsxs69(
|
|
33717
33854
|
Box,
|
|
33718
33855
|
{
|
|
33719
33856
|
flexDirection: "column",
|
|
@@ -33723,8 +33860,8 @@ function NoticeCard({
|
|
|
33723
33860
|
borderColor: color,
|
|
33724
33861
|
paddingX: 1,
|
|
33725
33862
|
children: [
|
|
33726
|
-
/* @__PURE__ */
|
|
33727
|
-
/* @__PURE__ */
|
|
33863
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color, children: `${icon} ${label}` }),
|
|
33864
|
+
/* @__PURE__ */ jsx72(Box, { flexDirection: "column", width: contentWidth, children: hasAnsi ? /* @__PURE__ */ jsx72(Text, { children: text }) : lines.map((line, i) => /* @__PURE__ */ jsx72(Text, { color, children: line.length > 0 ? line : " " }, i)) })
|
|
33728
33865
|
]
|
|
33729
33866
|
}
|
|
33730
33867
|
);
|
|
@@ -33746,7 +33883,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
33746
33883
|
if (entry.kind !== "assistant") return { steps: [], stripped: "" };
|
|
33747
33884
|
return parseNextSteps(entry.text, true);
|
|
33748
33885
|
}, [entry.kind, entry.text]);
|
|
33749
|
-
|
|
33886
|
+
useEffect66(() => {
|
|
33750
33887
|
if (!setSuggestions) return;
|
|
33751
33888
|
if (entry.kind !== "assistant") return;
|
|
33752
33889
|
if (openTodos) return;
|
|
@@ -33763,7 +33900,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
33763
33900
|
]);
|
|
33764
33901
|
switch (entry.kind) {
|
|
33765
33902
|
case "user":
|
|
33766
|
-
return /* @__PURE__ */
|
|
33903
|
+
return /* @__PURE__ */ jsx72(
|
|
33767
33904
|
Box,
|
|
33768
33905
|
{
|
|
33769
33906
|
marginX: 0,
|
|
@@ -33773,13 +33910,13 @@ var Entry = React8.memo(function Entry2({
|
|
|
33773
33910
|
borderBottom: false,
|
|
33774
33911
|
borderColor: theme.user,
|
|
33775
33912
|
paddingLeft: 1,
|
|
33776
|
-
children: /* @__PURE__ */
|
|
33777
|
-
/* @__PURE__ */
|
|
33778
|
-
/* @__PURE__ */
|
|
33779
|
-
entry.queued ? /* @__PURE__ */
|
|
33780
|
-
entry.pasteContent ? /* @__PURE__ */
|
|
33913
|
+
children: /* @__PURE__ */ jsxs69(Text, { children: [
|
|
33914
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.user, children: "\u{1F464} USER " }),
|
|
33915
|
+
/* @__PURE__ */ jsx72(Text, { color: "white", children: entry.text }),
|
|
33916
|
+
entry.queued ? /* @__PURE__ */ jsx72(Text, { dimColor: true, children: " (queued)" }) : null,
|
|
33917
|
+
entry.pasteContent ? /* @__PURE__ */ jsxs69(Fragment24, { children: [
|
|
33781
33918
|
entry.text ? "\n" : null,
|
|
33782
|
-
/* @__PURE__ */
|
|
33919
|
+
/* @__PURE__ */ jsxs69(Text, { dimColor: true, children: [
|
|
33783
33920
|
" \u21B3 ",
|
|
33784
33921
|
entry.pasteContent
|
|
33785
33922
|
] })
|
|
@@ -33790,7 +33927,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
33790
33927
|
case "thinking": {
|
|
33791
33928
|
if (showModelReasoning === false) return null;
|
|
33792
33929
|
const contentWidth = assistantContentWidth(termWidth);
|
|
33793
|
-
return /* @__PURE__ */
|
|
33930
|
+
return /* @__PURE__ */ jsxs69(
|
|
33794
33931
|
Box,
|
|
33795
33932
|
{
|
|
33796
33933
|
flexDirection: "column",
|
|
@@ -33803,11 +33940,11 @@ var Entry = React8.memo(function Entry2({
|
|
|
33803
33940
|
borderColor: theme.textSecondary,
|
|
33804
33941
|
paddingLeft: 1,
|
|
33805
33942
|
children: [
|
|
33806
|
-
/* @__PURE__ */
|
|
33807
|
-
/* @__PURE__ */
|
|
33808
|
-
/* @__PURE__ */
|
|
33943
|
+
/* @__PURE__ */ jsxs69(Box, { flexDirection: "row", children: [
|
|
33944
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.textSecondary, children: "\u27F3 Model Reasoning" }),
|
|
33945
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textSecondary, children: " (model reasoning\u2026)" })
|
|
33809
33946
|
] }),
|
|
33810
|
-
/* @__PURE__ */
|
|
33947
|
+
/* @__PURE__ */ jsx72(Box, { width: contentWidth, children: /* @__PURE__ */ jsx72(Text, { color: theme.textSecondary, children: entry.text }) })
|
|
33811
33948
|
]
|
|
33812
33949
|
}
|
|
33813
33950
|
);
|
|
@@ -33816,8 +33953,8 @@ var Entry = React8.memo(function Entry2({
|
|
|
33816
33953
|
const contentWidth = assistantContentWidth(termWidth);
|
|
33817
33954
|
const { steps, stripped } = nextSteps;
|
|
33818
33955
|
const hasNext = steps.length > 0 && !openTodos && isFinalTurnEntry;
|
|
33819
|
-
return /* @__PURE__ */
|
|
33820
|
-
/* @__PURE__ */
|
|
33956
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", children: [
|
|
33957
|
+
/* @__PURE__ */ jsxs69(
|
|
33821
33958
|
Box,
|
|
33822
33959
|
{
|
|
33823
33960
|
flexDirection: "column",
|
|
@@ -33830,12 +33967,12 @@ var Entry = React8.memo(function Entry2({
|
|
|
33830
33967
|
borderColor: theme.assistant,
|
|
33831
33968
|
paddingLeft: 1,
|
|
33832
33969
|
children: [
|
|
33833
|
-
/* @__PURE__ */
|
|
33834
|
-
/* @__PURE__ */
|
|
33970
|
+
/* @__PURE__ */ jsx72(Box, { flexDirection: "row", children: /* @__PURE__ */ jsx72(Text, { bold: true, color: theme.assistant, children: "\u{1F4AC} ASSISTANT" }) }),
|
|
33971
|
+
/* @__PURE__ */ jsx72(AssistantBody, { text: stripped, termWidth, contentWidth })
|
|
33835
33972
|
]
|
|
33836
33973
|
}
|
|
33837
33974
|
),
|
|
33838
|
-
hasNext && /* @__PURE__ */
|
|
33975
|
+
hasNext && /* @__PURE__ */ jsxs69(
|
|
33839
33976
|
Box,
|
|
33840
33977
|
{
|
|
33841
33978
|
flexDirection: "column",
|
|
@@ -33848,18 +33985,18 @@ var Entry = React8.memo(function Entry2({
|
|
|
33848
33985
|
borderColor: theme.accent,
|
|
33849
33986
|
paddingLeft: 1,
|
|
33850
33987
|
children: [
|
|
33851
|
-
/* @__PURE__ */
|
|
33852
|
-
/* @__PURE__ */
|
|
33853
|
-
/* @__PURE__ */
|
|
33988
|
+
/* @__PURE__ */ jsxs69(Box, { flexDirection: "row", marginBottom: 1, children: [
|
|
33989
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.accent, children: "\u{1F4A1} NEXT STEPS " }),
|
|
33990
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: "(use /next 1, /next 1 2 3 to select)" })
|
|
33854
33991
|
] }),
|
|
33855
|
-
steps.map((s2, i) => /* @__PURE__ */
|
|
33856
|
-
/* @__PURE__ */
|
|
33857
|
-
/* @__PURE__ */
|
|
33858
|
-
s2.auto ? /* @__PURE__ */
|
|
33992
|
+
steps.map((s2, i) => /* @__PURE__ */ jsx72(Box, { flexDirection: "row", marginTop: 0, children: /* @__PURE__ */ jsxs69(Text, { children: [
|
|
33993
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.accent, children: ` ${s2.index}. ` }),
|
|
33994
|
+
/* @__PURE__ */ jsx72(Text, { children: s2.text }),
|
|
33995
|
+
s2.auto ? /* @__PURE__ */ jsxs69(Text, { color: "cyan", dimColor: true, children: [
|
|
33859
33996
|
" ",
|
|
33860
33997
|
"auto"
|
|
33861
33998
|
] }) : null,
|
|
33862
|
-
autonomyMode === "auto" && i === 0 ? /* @__PURE__ */
|
|
33999
|
+
autonomyMode === "auto" && i === 0 ? /* @__PURE__ */ jsx72(Text, { color: "cyan", children: " \u23E9" }) : null
|
|
33863
34000
|
] }) }, s2.index))
|
|
33864
34001
|
]
|
|
33865
34002
|
}
|
|
@@ -33951,8 +34088,8 @@ var Entry = React8.memo(function Entry2({
|
|
|
33951
34088
|
const targetBudget = Math.max(24, termWidth - mutation.verb.length - 16);
|
|
33952
34089
|
const hasCounts = mutation.added > 0 || mutation.removed > 0;
|
|
33953
34090
|
const toolContentWidth2 = Math.max(20, termWidth - 2);
|
|
33954
|
-
return /* @__PURE__ */
|
|
33955
|
-
/* @__PURE__ */
|
|
34091
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", children: [
|
|
34092
|
+
/* @__PURE__ */ jsxs69(
|
|
33956
34093
|
ToolCard,
|
|
33957
34094
|
{
|
|
33958
34095
|
glyph: glyph2,
|
|
@@ -33963,23 +34100,23 @@ var Entry = React8.memo(function Entry2({
|
|
|
33963
34100
|
termWidth,
|
|
33964
34101
|
hasBody: true,
|
|
33965
34102
|
children: [
|
|
33966
|
-
/* @__PURE__ */
|
|
33967
|
-
/* @__PURE__ */
|
|
33968
|
-
mutation.added > 0 ? /* @__PURE__ */
|
|
33969
|
-
mutation.added > 0 && mutation.removed > 0 ? /* @__PURE__ */
|
|
33970
|
-
mutation.removed > 0 ? /* @__PURE__ */
|
|
33971
|
-
hasCounts ? /* @__PURE__ */
|
|
33972
|
-
/* @__PURE__ */
|
|
34103
|
+
/* @__PURE__ */ jsxs69(Text, { children: [
|
|
34104
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: "\u23BF " }),
|
|
34105
|
+
mutation.added > 0 ? /* @__PURE__ */ jsx72(Text, { bold: true, color: theme.success, children: `+${mutation.added}` }) : null,
|
|
34106
|
+
mutation.added > 0 && mutation.removed > 0 ? /* @__PURE__ */ jsx72(Text, { children: " " }) : null,
|
|
34107
|
+
mutation.removed > 0 ? /* @__PURE__ */ jsx72(Text, { bold: true, color: theme.error, children: `-${mutation.removed}` }) : null,
|
|
34108
|
+
hasCounts ? /* @__PURE__ */ jsx72(Text, { dimColor: true, children: " " }) : null,
|
|
34109
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: statsText })
|
|
33973
34110
|
] }),
|
|
33974
|
-
entry.resultRenderMode !== "simple" && multiDiffs ? /* @__PURE__ */
|
|
34111
|
+
entry.resultRenderMode !== "simple" && multiDiffs ? /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", children: [
|
|
33975
34112
|
(() => {
|
|
33976
34113
|
const summaryLine = formatMultiDiffSummary(
|
|
33977
34114
|
summarizeMultiFileDiffs(multiDiffs),
|
|
33978
34115
|
multiDiffSummaryThreshold ?? -1
|
|
33979
34116
|
);
|
|
33980
|
-
return summaryLine ? /* @__PURE__ */
|
|
34117
|
+
return summaryLine ? /* @__PURE__ */ jsx72(Text, { dimColor: true, italic: true, children: ` ${summaryLine}` }) : null;
|
|
33981
34118
|
})(),
|
|
33982
|
-
multiDiffs.map((item) => /* @__PURE__ */
|
|
34119
|
+
multiDiffs.map((item) => /* @__PURE__ */ jsx72(
|
|
33983
34120
|
DiffFileBlock,
|
|
33984
34121
|
{
|
|
33985
34122
|
path: item.path,
|
|
@@ -33989,7 +34126,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
33989
34126
|
},
|
|
33990
34127
|
item.path
|
|
33991
34128
|
))
|
|
33992
|
-
] }) : entry.resultRenderMode !== "simple" && diff ? /* @__PURE__ */
|
|
34129
|
+
] }) : entry.resultRenderMode !== "simple" && diff ? /* @__PURE__ */ jsx72(
|
|
33993
34130
|
DiffBlock,
|
|
33994
34131
|
{
|
|
33995
34132
|
rows: diff.rows,
|
|
@@ -34007,7 +34144,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34007
34144
|
]
|
|
34008
34145
|
}
|
|
34009
34146
|
),
|
|
34010
|
-
showSageMemoryInject !== false ? /* @__PURE__ */
|
|
34147
|
+
showSageMemoryInject !== false ? /* @__PURE__ */ jsx72(
|
|
34011
34148
|
SageMemoryBlock,
|
|
34012
34149
|
{
|
|
34013
34150
|
sageLines,
|
|
@@ -34021,8 +34158,8 @@ var Entry = React8.memo(function Entry2({
|
|
|
34021
34158
|
const hasToolBody = Boolean(
|
|
34022
34159
|
visualLines && visualLines.length > 0 || entry.resultRenderMode !== "simple" && outLines.length > 0 || entry.resultRenderMode !== "simple" && (diff || multiDiffs)
|
|
34023
34160
|
);
|
|
34024
|
-
return /* @__PURE__ */
|
|
34025
|
-
/* @__PURE__ */
|
|
34161
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", children: [
|
|
34162
|
+
/* @__PURE__ */ jsxs69(
|
|
34026
34163
|
ToolCard,
|
|
34027
34164
|
{
|
|
34028
34165
|
glyph: glyph2,
|
|
@@ -34034,7 +34171,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34034
34171
|
termWidth,
|
|
34035
34172
|
hasBody: hasToolBody,
|
|
34036
34173
|
children: [
|
|
34037
|
-
visualLines && entry.resultRenderMode !== "simple" ? /* @__PURE__ */
|
|
34174
|
+
visualLines && entry.resultRenderMode !== "simple" ? /* @__PURE__ */ jsx72(
|
|
34038
34175
|
ToolOutputLines,
|
|
34039
34176
|
{
|
|
34040
34177
|
lines: visualLines,
|
|
@@ -34045,12 +34182,12 @@ var Entry = React8.memo(function Entry2({
|
|
|
34045
34182
|
// count for edit, line count for read, etc.) but the diff
|
|
34046
34183
|
// body below is hidden. The user always gets a one-line
|
|
34047
34184
|
// summary so the entry never looks empty.
|
|
34048
|
-
/* @__PURE__ */
|
|
34185
|
+
/* @__PURE__ */ jsx72(ToolOutputLines, { lines: visualLines, hasFollowingBlock: false })
|
|
34049
34186
|
) : entry.resultRenderMode === "simple" ? null : outLines.map((line, i) => {
|
|
34050
34187
|
const connector = i === outLines.length - 1 && !diff && !multiDiffs ? " \u2514\u2500 " : " \u251C\u2500 ";
|
|
34051
|
-
return /* @__PURE__ */
|
|
34052
|
-
/* @__PURE__ */
|
|
34053
|
-
/* @__PURE__ */
|
|
34188
|
+
return /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34189
|
+
/* @__PURE__ */ jsx72(Text, { color, dimColor: true, children: connector }),
|
|
34190
|
+
/* @__PURE__ */ jsx72(
|
|
34054
34191
|
Text,
|
|
34055
34192
|
{
|
|
34056
34193
|
dimColor: entry.ok && !line.startsWith("!"),
|
|
@@ -34060,15 +34197,15 @@ var Entry = React8.memo(function Entry2({
|
|
|
34060
34197
|
)
|
|
34061
34198
|
] }, i);
|
|
34062
34199
|
}),
|
|
34063
|
-
entry.resultRenderMode !== "simple" && multiDiffs ? /* @__PURE__ */
|
|
34200
|
+
entry.resultRenderMode !== "simple" && multiDiffs ? /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", children: [
|
|
34064
34201
|
(() => {
|
|
34065
34202
|
const summaryLine = formatMultiDiffSummary(
|
|
34066
34203
|
summarizeMultiFileDiffs(multiDiffs),
|
|
34067
34204
|
multiDiffSummaryThreshold ?? -1
|
|
34068
34205
|
);
|
|
34069
|
-
return summaryLine ? /* @__PURE__ */
|
|
34206
|
+
return summaryLine ? /* @__PURE__ */ jsx72(Text, { dimColor: true, italic: true, children: summaryLine }) : null;
|
|
34070
34207
|
})(),
|
|
34071
|
-
multiDiffs.map((item) => /* @__PURE__ */
|
|
34208
|
+
multiDiffs.map((item) => /* @__PURE__ */ jsx72(
|
|
34072
34209
|
DiffFileBlock,
|
|
34073
34210
|
{
|
|
34074
34211
|
path: item.path,
|
|
@@ -34078,7 +34215,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34078
34215
|
},
|
|
34079
34216
|
item.path
|
|
34080
34217
|
))
|
|
34081
|
-
] }) : entry.resultRenderMode !== "simple" && diff ? /* @__PURE__ */
|
|
34218
|
+
] }) : entry.resultRenderMode !== "simple" && diff ? /* @__PURE__ */ jsx72(
|
|
34082
34219
|
DiffBlock,
|
|
34083
34220
|
{
|
|
34084
34221
|
rows: diff.rows,
|
|
@@ -34094,7 +34231,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34094
34231
|
]
|
|
34095
34232
|
}
|
|
34096
34233
|
),
|
|
34097
|
-
showSageMemoryInject !== false ? /* @__PURE__ */
|
|
34234
|
+
showSageMemoryInject !== false ? /* @__PURE__ */ jsx72(SageMemoryBlock, { sageLines, toolName: entry.name, stats: entry.sageStats }) : null
|
|
34098
34235
|
] });
|
|
34099
34236
|
}
|
|
34100
34237
|
case "memory-activation": {
|
|
@@ -34104,56 +34241,56 @@ var Entry = React8.memo(function Entry2({
|
|
|
34104
34241
|
const shown = injected.slice(0, MAX_MEMORY_PROOF_ROWS);
|
|
34105
34242
|
const overflow = injected.length - shown.length;
|
|
34106
34243
|
const thresholds = entry.thresholds ?? MEMORY_GATE_DEFAULTS;
|
|
34107
|
-
return /* @__PURE__ */
|
|
34108
|
-
/* @__PURE__ */
|
|
34109
|
-
/* @__PURE__ */
|
|
34110
|
-
/* @__PURE__ */
|
|
34111
|
-
/* @__PURE__ */
|
|
34244
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", borderStyle: "single", borderColor: "magenta", paddingX: 1, children: [
|
|
34245
|
+
/* @__PURE__ */ jsxs69(Box, { flexDirection: "row", children: [
|
|
34246
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: "magenta", children: "\u{1F9E0} MEMORY INJECTOR " }),
|
|
34247
|
+
/* @__PURE__ */ jsx72(Text, { color: "cyan", children: entry.trigger }),
|
|
34248
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: ` ${entry.activated.length} activated \u2192 ${entry.injectedIds.length} injected / ${entry.candidates} \xB7 ctx ${Math.round(entry.contextPressure * 100)}% \xB7 +${entry.injectedChars} chars` })
|
|
34112
34249
|
] }),
|
|
34113
|
-
entry.error ? /* @__PURE__ */
|
|
34114
|
-
entry.queryPreview ? /* @__PURE__ */
|
|
34250
|
+
entry.error ? /* @__PURE__ */ jsx72(Text, { color: "red", children: `error: ${entry.error}` }) : null,
|
|
34251
|
+
entry.queryPreview ? /* @__PURE__ */ jsx72(Text, { dimColor: true, wrap: "truncate-end", children: `query: ${entry.queryPreview}` }) : null,
|
|
34115
34252
|
shown.map((memory) => {
|
|
34116
34253
|
const scorePass = memory.score >= thresholds.minScore;
|
|
34117
34254
|
const relationPass = memory.relationStrength >= thresholds.relationFloor;
|
|
34118
34255
|
const reason = memory.activationReasons[0] ?? "no recorded reason";
|
|
34119
|
-
return /* @__PURE__ */
|
|
34120
|
-
/* @__PURE__ */
|
|
34121
|
-
/* @__PURE__ */
|
|
34122
|
-
/* @__PURE__ */
|
|
34123
|
-
/* @__PURE__ */
|
|
34124
|
-
/* @__PURE__ */
|
|
34125
|
-
/* @__PURE__ */
|
|
34256
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", children: [
|
|
34257
|
+
/* @__PURE__ */ jsxs69(Text, { wrap: "truncate-end", children: [
|
|
34258
|
+
/* @__PURE__ */ jsx72(Text, { color: "green", children: `${memory.id} ` }),
|
|
34259
|
+
/* @__PURE__ */ jsx72(Text, { color: scorePass ? "green" : "red", children: `${memory.score.toFixed(2)} ${scorePass ? "\u2713" : "\u2717"} ${thresholds.minScore.toFixed(2)}` }),
|
|
34260
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: " \xB7 relation " }),
|
|
34261
|
+
/* @__PURE__ */ jsx72(Text, { color: relationPass ? "green" : "red", children: `${memory.relationStrength.toFixed(2)} ${relationPass ? "\u2713" : "\u2717"} ${thresholds.relationFloor.toFixed(2)}` }),
|
|
34262
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: ` \xB7 ${reason}` })
|
|
34126
34263
|
] }),
|
|
34127
|
-
/* @__PURE__ */
|
|
34264
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, wrap: "truncate-end", children: ` ${formatScoreTerms(memory.scoreTerms ?? [])}` })
|
|
34128
34265
|
] }, memory.id);
|
|
34129
34266
|
}),
|
|
34130
|
-
overflow > 0 ? /* @__PURE__ */
|
|
34131
|
-
rejected ? /* @__PURE__ */
|
|
34267
|
+
overflow > 0 ? /* @__PURE__ */ jsx72(Text, { dimColor: true, children: ` +${overflow} more injected` }) : null,
|
|
34268
|
+
rejected ? /* @__PURE__ */ jsx72(Text, { dimColor: true, children: `filtered: ${rejected}` }) : null
|
|
34132
34269
|
] });
|
|
34133
34270
|
}
|
|
34134
34271
|
case "memory-lifecycle": {
|
|
34135
34272
|
const style = memoryLifecycleStyle(entry.action);
|
|
34136
|
-
return /* @__PURE__ */
|
|
34137
|
-
/* @__PURE__ */
|
|
34138
|
-
/* @__PURE__ */
|
|
34139
|
-
entry.detail ? /* @__PURE__ */
|
|
34273
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "row", children: [
|
|
34274
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: style.color, children: `${style.icon} MEMORY ` }),
|
|
34275
|
+
/* @__PURE__ */ jsx72(Text, { color: style.color, children: entry.label }),
|
|
34276
|
+
entry.detail ? /* @__PURE__ */ jsx72(Text, { dimColor: true, children: ` \xB7 ${entry.detail}` }) : null
|
|
34140
34277
|
] });
|
|
34141
34278
|
}
|
|
34142
34279
|
case "info": {
|
|
34143
34280
|
const hasAnsi = /\x1b\[/.test(entry.text);
|
|
34144
|
-
if (hasAnsi) return /* @__PURE__ */
|
|
34145
|
-
return /* @__PURE__ */
|
|
34146
|
-
/* @__PURE__ */
|
|
34281
|
+
if (hasAnsi) return /* @__PURE__ */ jsx72(Text, { children: entry.text });
|
|
34282
|
+
return /* @__PURE__ */ jsxs69(Text, { dimColor: true, children: [
|
|
34283
|
+
/* @__PURE__ */ jsx72(Text, { children: "\u2139 " }),
|
|
34147
34284
|
entry.text
|
|
34148
34285
|
] });
|
|
34149
34286
|
}
|
|
34150
34287
|
case "warn":
|
|
34151
|
-
return /* @__PURE__ */
|
|
34152
|
-
/* @__PURE__ */
|
|
34153
|
-
/* @__PURE__ */
|
|
34288
|
+
return /* @__PURE__ */ jsx72(Box, { flexDirection: "row", marginY: 0, children: /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34289
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.warn, children: "\u26A0 " }),
|
|
34290
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.warn, children: entry.text })
|
|
34154
34291
|
] }) });
|
|
34155
34292
|
case "error":
|
|
34156
|
-
return /* @__PURE__ */
|
|
34293
|
+
return /* @__PURE__ */ jsx72(
|
|
34157
34294
|
NoticeCard,
|
|
34158
34295
|
{
|
|
34159
34296
|
icon: "\u2717",
|
|
@@ -34164,7 +34301,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34164
34301
|
}
|
|
34165
34302
|
);
|
|
34166
34303
|
case "turn-summary":
|
|
34167
|
-
return /* @__PURE__ */
|
|
34304
|
+
return /* @__PURE__ */ jsx72(
|
|
34168
34305
|
Box,
|
|
34169
34306
|
{
|
|
34170
34307
|
marginX: 0,
|
|
@@ -34172,9 +34309,9 @@ var Entry = React8.memo(function Entry2({
|
|
|
34172
34309
|
borderColor: theme.textMuted,
|
|
34173
34310
|
backgroundColor: theme.surfaceRaised,
|
|
34174
34311
|
paddingX: 1,
|
|
34175
|
-
children: /* @__PURE__ */
|
|
34176
|
-
/* @__PURE__ */
|
|
34177
|
-
/* @__PURE__ */
|
|
34312
|
+
children: /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34313
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.brandPrimary, children: "\u{1F4CB} " }),
|
|
34314
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textSecondary, children: entry.text })
|
|
34178
34315
|
] })
|
|
34179
34316
|
}
|
|
34180
34317
|
);
|
|
@@ -34187,7 +34324,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34187
34324
|
const fromChip = ctxChip(entry.fromContext);
|
|
34188
34325
|
const toChip = ctxChip(entry.toContext);
|
|
34189
34326
|
const pct = shrink && entry.requestTokens && entry.requestTokens > 0 && entry.toContext ? Math.round(entry.requestTokens / entry.toContext * 100) : void 0;
|
|
34190
|
-
return /* @__PURE__ */
|
|
34327
|
+
return /* @__PURE__ */ jsxs69(
|
|
34191
34328
|
Box,
|
|
34192
34329
|
{
|
|
34193
34330
|
flexDirection: "column",
|
|
@@ -34197,19 +34334,19 @@ var Entry = React8.memo(function Entry2({
|
|
|
34197
34334
|
borderColor: accent,
|
|
34198
34335
|
paddingX: 1,
|
|
34199
34336
|
children: [
|
|
34200
|
-
/* @__PURE__ */
|
|
34201
|
-
fromRef ? /* @__PURE__ */
|
|
34202
|
-
/* @__PURE__ */
|
|
34203
|
-
/* @__PURE__ */
|
|
34204
|
-
fromChip ? /* @__PURE__ */
|
|
34337
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: accent, children: "\u{1F504} MODEL SWITCHED" }),
|
|
34338
|
+
fromRef ? /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34339
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: " from " }),
|
|
34340
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: fromRef }),
|
|
34341
|
+
fromChip ? /* @__PURE__ */ jsx72(Text, { dimColor: true, children: ` ${fromChip}` }) : null
|
|
34205
34342
|
] }) : null,
|
|
34206
|
-
/* @__PURE__ */
|
|
34207
|
-
/* @__PURE__ */
|
|
34208
|
-
/* @__PURE__ */
|
|
34209
|
-
toChip ? /* @__PURE__ */
|
|
34343
|
+
/* @__PURE__ */ jsxs69(Text, { children: [
|
|
34344
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: fromRef ? " to " : " now " }),
|
|
34345
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.assistant, children: toRef }),
|
|
34346
|
+
toChip ? /* @__PURE__ */ jsx72(Text, { color: shrink ? theme.warn : theme.success, children: ` ${toChip}` }) : null
|
|
34210
34347
|
] }),
|
|
34211
|
-
/* @__PURE__ */
|
|
34212
|
-
shrink ? /* @__PURE__ */
|
|
34348
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.success, children: entry.runActive ? " \u2713 active for next LLM request \xB7 current run continues" : " \u2713 active for next LLM request" }),
|
|
34349
|
+
shrink ? /* @__PURE__ */ jsx72(Text, { color: theme.warn, children: ` \u26A0 smaller window: ${fmtTok3(entry.fromContext)} \u2192 ${fmtTok3(
|
|
34213
34350
|
entry.toContext
|
|
34214
34351
|
)}${pct !== void 0 ? ` \xB7 request \u2248 ${fmtTok3(entry.requestTokens)} (${pct}% of new window)` : ""}` }) : null
|
|
34215
34352
|
]
|
|
@@ -34220,7 +34357,7 @@ var Entry = React8.memo(function Entry2({
|
|
|
34220
34357
|
const statusStyle = brainStatusStyle(entry.status);
|
|
34221
34358
|
const riskColor2 = brainRiskColor(entry.risk);
|
|
34222
34359
|
const indentWidth = 2;
|
|
34223
|
-
return /* @__PURE__ */
|
|
34360
|
+
return /* @__PURE__ */ jsxs69(
|
|
34224
34361
|
Box,
|
|
34225
34362
|
{
|
|
34226
34363
|
flexDirection: "column",
|
|
@@ -34233,34 +34370,34 @@ var Entry = React8.memo(function Entry2({
|
|
|
34233
34370
|
borderColor: theme.monitor.agents,
|
|
34234
34371
|
paddingLeft: 1,
|
|
34235
34372
|
children: [
|
|
34236
|
-
/* @__PURE__ */
|
|
34237
|
-
/* @__PURE__ */
|
|
34238
|
-
/* @__PURE__ */
|
|
34239
|
-
/* @__PURE__ */
|
|
34240
|
-
/* @__PURE__ */
|
|
34241
|
-
/* @__PURE__ */
|
|
34373
|
+
/* @__PURE__ */ jsxs69(Box, { flexDirection: "row", gap: 1, children: [
|
|
34374
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.monitor.agents, children: "\u2726 BRAIN" }),
|
|
34375
|
+
/* @__PURE__ */ jsx72(Text, { color: statusStyle.color, children: statusStyle.icon }),
|
|
34376
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: entry.source }),
|
|
34377
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: "\xB7" }),
|
|
34378
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: riskColor2, children: entry.risk })
|
|
34242
34379
|
] }),
|
|
34243
|
-
/* @__PURE__ */
|
|
34244
|
-
entry.decision ? /* @__PURE__ */
|
|
34245
|
-
/* @__PURE__ */
|
|
34246
|
-
/* @__PURE__ */
|
|
34380
|
+
/* @__PURE__ */ jsx72(Box, { paddingLeft: indentWidth, children: /* @__PURE__ */ jsx72(Text, { color: theme.textPrimary, children: entry.question }) }),
|
|
34381
|
+
entry.decision ? /* @__PURE__ */ jsx72(Box, { paddingLeft: indentWidth, marginTop: 1, children: /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34382
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: statusStyle.color, children: "\u21B3 Decision: " }),
|
|
34383
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textPrimary, children: entry.decision })
|
|
34247
34384
|
] }) }) : null,
|
|
34248
|
-
entry.rationale ? /* @__PURE__ */
|
|
34249
|
-
entry.outcome ? /* @__PURE__ */
|
|
34250
|
-
/* @__PURE__ */
|
|
34251
|
-
/* @__PURE__ */
|
|
34385
|
+
entry.rationale ? /* @__PURE__ */ jsx72(Box, { paddingLeft: indentWidth, marginTop: 1, children: /* @__PURE__ */ jsx72(Text, { dimColor: true, children: entry.rationale }) }) : null,
|
|
34386
|
+
entry.outcome ? /* @__PURE__ */ jsx72(Box, { paddingLeft: indentWidth, marginTop: 1, children: /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34387
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: statusStyle.color, children: "\u2713 Outcome: " }),
|
|
34388
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textPrimary, children: entry.outcome })
|
|
34252
34389
|
] }) }) : null,
|
|
34253
|
-
entry.council ? /* @__PURE__ */
|
|
34254
|
-
/* @__PURE__ */
|
|
34255
|
-
entry.council.seats.map((seat) => /* @__PURE__ */
|
|
34256
|
-
(entry.council.warnings ?? []).map((warning) => /* @__PURE__ */
|
|
34390
|
+
entry.council ? /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", paddingLeft: indentWidth, marginTop: 1, children: [
|
|
34391
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: councilHeadline(entry.council) }),
|
|
34392
|
+
entry.council.seats.map((seat) => /* @__PURE__ */ jsx72(Text, { dimColor: true, children: councilSeatLine(seat) }, seat.seatId)),
|
|
34393
|
+
(entry.council.warnings ?? []).map((warning) => /* @__PURE__ */ jsx72(Text, { color: theme.warn, children: ` \u26A0 ${warning}` }, warning))
|
|
34257
34394
|
] }) : null
|
|
34258
34395
|
]
|
|
34259
34396
|
}
|
|
34260
34397
|
);
|
|
34261
34398
|
}
|
|
34262
34399
|
case "confirm":
|
|
34263
|
-
return /* @__PURE__ */
|
|
34400
|
+
return /* @__PURE__ */ jsxs69(
|
|
34264
34401
|
Box,
|
|
34265
34402
|
{
|
|
34266
34403
|
flexDirection: "column",
|
|
@@ -34269,16 +34406,16 @@ var Entry = React8.memo(function Entry2({
|
|
|
34269
34406
|
paddingX: 1,
|
|
34270
34407
|
marginY: 1,
|
|
34271
34408
|
children: [
|
|
34272
|
-
/* @__PURE__ */
|
|
34409
|
+
/* @__PURE__ */ jsxs69(Text, { bold: true, color: theme.warn, children: [
|
|
34273
34410
|
"\u26A0 Confirm: ",
|
|
34274
34411
|
entry.toolName
|
|
34275
34412
|
] }),
|
|
34276
|
-
/* @__PURE__ */
|
|
34413
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: "Waiting for y / n / a / d..." })
|
|
34277
34414
|
]
|
|
34278
34415
|
}
|
|
34279
34416
|
);
|
|
34280
34417
|
case "banner":
|
|
34281
|
-
return /* @__PURE__ */
|
|
34418
|
+
return /* @__PURE__ */ jsx72(
|
|
34282
34419
|
Banner,
|
|
34283
34420
|
{
|
|
34284
34421
|
entry,
|
|
@@ -34288,22 +34425,22 @@ var Entry = React8.memo(function Entry2({
|
|
|
34288
34425
|
);
|
|
34289
34426
|
case "subagent": {
|
|
34290
34427
|
const lines = entry.text.split("\n");
|
|
34291
|
-
return /* @__PURE__ */
|
|
34292
|
-
/* @__PURE__ */
|
|
34293
|
-
/* @__PURE__ */
|
|
34294
|
-
/* @__PURE__ */
|
|
34295
|
-
/* @__PURE__ */
|
|
34296
|
-
/* @__PURE__ */
|
|
34297
|
-
/* @__PURE__ */
|
|
34298
|
-
/* @__PURE__ */
|
|
34299
|
-
entry.detail ? /* @__PURE__ */
|
|
34300
|
-
/* @__PURE__ */
|
|
34301
|
-
/* @__PURE__ */
|
|
34428
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", marginX: 0, marginY: 0, paddingLeft: 0, children: [
|
|
34429
|
+
/* @__PURE__ */ jsxs69(Text, { children: [
|
|
34430
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.borderSubtle, children: "\u2502 " }),
|
|
34431
|
+
/* @__PURE__ */ jsx72(Text, { color: entry.agentColor, children: entry.icon }),
|
|
34432
|
+
/* @__PURE__ */ jsx72(Text, { children: " " }),
|
|
34433
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: entry.agentColor, children: entry.agentLabel }),
|
|
34434
|
+
/* @__PURE__ */ jsx72(Text, { children: " " }),
|
|
34435
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textSecondary, children: lines[0] ?? "" }),
|
|
34436
|
+
entry.detail ? /* @__PURE__ */ jsxs69(Fragment24, { children: [
|
|
34437
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textMuted, children: " \xB7 " }),
|
|
34438
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textMuted, children: entry.detail })
|
|
34302
34439
|
] }) : null
|
|
34303
34440
|
] }),
|
|
34304
|
-
lines.slice(1).map((line, i) => /* @__PURE__ */
|
|
34305
|
-
/* @__PURE__ */
|
|
34306
|
-
/* @__PURE__ */
|
|
34441
|
+
lines.slice(1).map((line, i) => /* @__PURE__ */ jsxs69(Text, { children: [
|
|
34442
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.borderSubtle, children: "\u2502 " }),
|
|
34443
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textMuted, children: line })
|
|
34307
34444
|
] }, i))
|
|
34308
34445
|
] });
|
|
34309
34446
|
}
|
|
@@ -34317,7 +34454,7 @@ function SageMemoryBlock({
|
|
|
34317
34454
|
if (!sageLines || sageLines.length < 2) return null;
|
|
34318
34455
|
const memoryLines = sageLines.slice(1);
|
|
34319
34456
|
if (memoryLines.length === 0) return null;
|
|
34320
|
-
return /* @__PURE__ */
|
|
34457
|
+
return /* @__PURE__ */ jsxs69(
|
|
34321
34458
|
Box,
|
|
34322
34459
|
{
|
|
34323
34460
|
flexDirection: "column",
|
|
@@ -34327,16 +34464,16 @@ function SageMemoryBlock({
|
|
|
34327
34464
|
paddingX: 1,
|
|
34328
34465
|
marginTop: 0,
|
|
34329
34466
|
children: [
|
|
34330
|
-
/* @__PURE__ */
|
|
34331
|
-
/* @__PURE__ */
|
|
34332
|
-
/* @__PURE__ */
|
|
34467
|
+
/* @__PURE__ */ jsxs69(Box, { flexDirection: "row", children: [
|
|
34468
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.accent, children: `\u{1F9E0} SAGE MEMORY INJECTED \xB7 ${toolName} ` }),
|
|
34469
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: `${memoryLines.length} ${memoryLines.length === 1 ? "memory" : "memories"}${stats ? ` \xB7 ${stats}` : ""}` })
|
|
34333
34470
|
] }),
|
|
34334
34471
|
memoryLines.map((line, i) => {
|
|
34335
34472
|
const parsed = parseSageMemoryLine(line);
|
|
34336
34473
|
if (!parsed) {
|
|
34337
|
-
return /* @__PURE__ */
|
|
34474
|
+
return /* @__PURE__ */ jsx72(Text, { color: theme.accent, dimColor: true, wrap: "truncate-end", children: line }, i);
|
|
34338
34475
|
}
|
|
34339
|
-
return /* @__PURE__ */
|
|
34476
|
+
return /* @__PURE__ */ jsx72(SageMemoryRow, { parsed, index: i }, i);
|
|
34340
34477
|
})
|
|
34341
34478
|
]
|
|
34342
34479
|
}
|
|
@@ -34348,26 +34485,26 @@ function SageMemoryRow({
|
|
|
34348
34485
|
}) {
|
|
34349
34486
|
const labelText = parsed.labels.length > 0 ? parsed.labels.map((l) => `[${l}]`).join("") : "[memory]";
|
|
34350
34487
|
const tagText = parsed.tags && parsed.tags.length > 0 ? parsed.tags.join(", ") : void 0;
|
|
34351
|
-
return /* @__PURE__ */
|
|
34352
|
-
/* @__PURE__ */
|
|
34353
|
-
/* @__PURE__ */
|
|
34354
|
-
/* @__PURE__ */
|
|
34355
|
-
/* @__PURE__ */
|
|
34356
|
-
parsed.anchor ? /* @__PURE__ */
|
|
34357
|
-
parsed.relation ? /* @__PURE__ */
|
|
34358
|
-
tagText ? /* @__PURE__ */
|
|
34488
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "column", marginTop: index > 0 ? 1 : 0, children: [
|
|
34489
|
+
/* @__PURE__ */ jsx72(Text, { bold: true, color: theme.accent, children: labelText }),
|
|
34490
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textPrimary, children: parsed.text }),
|
|
34491
|
+
/* @__PURE__ */ jsxs69(Box, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
34492
|
+
/* @__PURE__ */ jsx72(SageKv, { label: "id", value: parsed.id }),
|
|
34493
|
+
parsed.anchor ? /* @__PURE__ */ jsx72(SageKv, { label: "anchor", value: parsed.anchor }) : null,
|
|
34494
|
+
parsed.relation ? /* @__PURE__ */ jsx72(SageKv, { label: "relation", value: parsed.relation }) : null,
|
|
34495
|
+
tagText ? /* @__PURE__ */ jsx72(SageKv, { label: "tags", value: tagText }) : null
|
|
34359
34496
|
] })
|
|
34360
34497
|
] });
|
|
34361
34498
|
}
|
|
34362
34499
|
function SageKv({ label, value }) {
|
|
34363
|
-
return /* @__PURE__ */
|
|
34364
|
-
/* @__PURE__ */
|
|
34365
|
-
/* @__PURE__ */
|
|
34500
|
+
return /* @__PURE__ */ jsxs69(Box, { flexDirection: "row", marginRight: 2, children: [
|
|
34501
|
+
/* @__PURE__ */ jsx72(Text, { dimColor: true, children: `${label}: ` }),
|
|
34502
|
+
/* @__PURE__ */ jsx72(Text, { color: theme.textSecondary, children: value })
|
|
34366
34503
|
] });
|
|
34367
34504
|
}
|
|
34368
34505
|
|
|
34369
34506
|
// src/components/history/index.tsx
|
|
34370
|
-
import { Fragment as Fragment25, jsx as
|
|
34507
|
+
import { Fragment as Fragment25, jsx as jsx73, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
34371
34508
|
var History = memo2(function History2({
|
|
34372
34509
|
entries,
|
|
34373
34510
|
generation,
|
|
@@ -34380,11 +34517,11 @@ var History = memo2(function History2({
|
|
|
34380
34517
|
showSageMemoryInject
|
|
34381
34518
|
}) {
|
|
34382
34519
|
const { stdout } = useStdout();
|
|
34383
|
-
const [termSize, setTermSize] =
|
|
34520
|
+
const [termSize, setTermSize] = useState40({
|
|
34384
34521
|
columns: stdout?.columns ?? 80,
|
|
34385
34522
|
rows: stdout?.rows ?? 24
|
|
34386
34523
|
});
|
|
34387
|
-
|
|
34524
|
+
useEffect67(() => {
|
|
34388
34525
|
const handleResize = () => {
|
|
34389
34526
|
setTermSize({ columns: stdout?.columns ?? 80, rows: stdout?.rows ?? 24 });
|
|
34390
34527
|
};
|
|
@@ -34395,7 +34532,7 @@ var History = memo2(function History2({
|
|
|
34395
34532
|
}, [stdout]);
|
|
34396
34533
|
const termWidth = termSize.columns;
|
|
34397
34534
|
const presentationKey = `w${termWidth}-mr${showModelReasoning}`;
|
|
34398
|
-
const emissionRef =
|
|
34535
|
+
const emissionRef = useRef37({
|
|
34399
34536
|
generation: generation ?? 0,
|
|
34400
34537
|
presentationKey,
|
|
34401
34538
|
revision: 0,
|
|
@@ -34441,8 +34578,8 @@ var History = memo2(function History2({
|
|
|
34441
34578
|
const staticKey = `${generation ?? 0}-${staticRevision}-${presentationKey}`;
|
|
34442
34579
|
const staticEntries = pendingEntries;
|
|
34443
34580
|
void toolStream;
|
|
34444
|
-
return /* @__PURE__ */
|
|
34445
|
-
/* @__PURE__ */
|
|
34581
|
+
return /* @__PURE__ */ jsxs70(Fragment25, { children: [
|
|
34582
|
+
/* @__PURE__ */ jsx73(Static, { items: staticEntries, children: (entry) => /* @__PURE__ */ jsx73(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, children: /* @__PURE__ */ jsx73(
|
|
34446
34583
|
Entry,
|
|
34447
34584
|
{
|
|
34448
34585
|
entry,
|
|
@@ -34456,7 +34593,7 @@ var History = memo2(function History2({
|
|
|
34456
34593
|
showSageMemoryInject
|
|
34457
34594
|
}
|
|
34458
34595
|
) }, entry.id) }, staticKey),
|
|
34459
|
-
/* @__PURE__ */
|
|
34596
|
+
/* @__PURE__ */ jsx73(Box, { flexGrow: 1 })
|
|
34460
34597
|
] });
|
|
34461
34598
|
});
|
|
34462
34599
|
|
|
@@ -34644,7 +34781,7 @@ function selectionHitAt(row, spans) {
|
|
|
34644
34781
|
}
|
|
34645
34782
|
|
|
34646
34783
|
// src/components/history/scrollbar-rail.tsx
|
|
34647
|
-
import { jsx as
|
|
34784
|
+
import { jsx as jsx74, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
34648
34785
|
function Scrollbar({
|
|
34649
34786
|
rows,
|
|
34650
34787
|
offset,
|
|
@@ -34659,18 +34796,18 @@ function Scrollbar({
|
|
|
34659
34796
|
}
|
|
34660
34797
|
const copyByRow = /* @__PURE__ */ new Map();
|
|
34661
34798
|
for (const hit of copyHits) copyByRow.set(hit.startRow, hit);
|
|
34662
|
-
return /* @__PURE__ */
|
|
34799
|
+
return /* @__PURE__ */ jsx74(Box, { flexDirection: "column", flexShrink: 0, children: cells.map((cell, row) => {
|
|
34663
34800
|
const copyHit = copyByRow.get(row);
|
|
34664
|
-
return /* @__PURE__ */
|
|
34665
|
-
/* @__PURE__ */
|
|
34801
|
+
return /* @__PURE__ */ jsxs71(Box, { flexDirection: "row", children: [
|
|
34802
|
+
/* @__PURE__ */ jsx74(
|
|
34666
34803
|
Text,
|
|
34667
34804
|
{
|
|
34668
34805
|
color: copyHit && copiedEntryId === copyHit.entryId ? theme.success : theme.textMuted,
|
|
34669
34806
|
children: copyHit ? COPY_ICON : " "
|
|
34670
34807
|
}
|
|
34671
34808
|
),
|
|
34672
|
-
/* @__PURE__ */
|
|
34673
|
-
/* @__PURE__ */
|
|
34809
|
+
/* @__PURE__ */ jsx74(Text, { children: " " }),
|
|
34810
|
+
/* @__PURE__ */ jsx74(
|
|
34674
34811
|
Text,
|
|
34675
34812
|
{
|
|
34676
34813
|
...scrollable ? { color: theme.accent } : {},
|
|
@@ -34683,7 +34820,7 @@ function Scrollbar({
|
|
|
34683
34820
|
}
|
|
34684
34821
|
|
|
34685
34822
|
// src/components/scrollable-history.tsx
|
|
34686
|
-
import { jsx as
|
|
34823
|
+
import { jsx as jsx75, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
34687
34824
|
function buildCopyRegistry(opts) {
|
|
34688
34825
|
const mountedGroupRows = opts.renderGroups.reduce(
|
|
34689
34826
|
(rows, group) => rows + (opts.heightCache.getHeight(renderGroupId(group)) ?? 0),
|
|
@@ -34751,12 +34888,12 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
34751
34888
|
const raw = stdout?.columns ?? 80;
|
|
34752
34889
|
return maxWidth ? Math.min(raw, maxWidth) : raw;
|
|
34753
34890
|
}, [stdout, maxWidth]);
|
|
34754
|
-
const [viewportWidth, setViewportWidth] =
|
|
34891
|
+
const [viewportWidth, setViewportWidth] = useState41(resolveViewportWidth);
|
|
34755
34892
|
const termWidth = useMemo14(
|
|
34756
34893
|
() => Math.max(1, viewportWidth - SCROLLBAR_HIT_WIDTH),
|
|
34757
34894
|
[viewportWidth]
|
|
34758
34895
|
);
|
|
34759
|
-
|
|
34896
|
+
useEffect68(() => {
|
|
34760
34897
|
const handleResize = () => {
|
|
34761
34898
|
setViewportWidth(resolveViewportWidth());
|
|
34762
34899
|
};
|
|
@@ -34771,22 +34908,22 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
34771
34908
|
const groupedEntries = useMemo14(() => groupEntries(entries), [entries]);
|
|
34772
34909
|
const groupIds = useMemo14(() => groupedEntries.map(renderGroupId), [groupedEntries]);
|
|
34773
34910
|
const groupIdsKey = groupIds.join(",");
|
|
34774
|
-
const heightCacheRef =
|
|
34911
|
+
const heightCacheRef = useRef38(null);
|
|
34775
34912
|
if (heightCacheRef.current === null) heightCacheRef.current = new EntryHeightCache();
|
|
34776
34913
|
const heightCache = heightCacheRef.current;
|
|
34777
|
-
const entryNodeRefs =
|
|
34778
|
-
const measuredGroupIdsRef =
|
|
34779
|
-
const copyHitsRef =
|
|
34780
|
-
const liveToolCopyHitRef =
|
|
34781
|
-
const mountedGroupSpansRef =
|
|
34782
|
-
const spansSignatureRef =
|
|
34783
|
-
const selectionRef =
|
|
34784
|
-
const toolStreamRef =
|
|
34914
|
+
const entryNodeRefs = useRef38(/* @__PURE__ */ new Map());
|
|
34915
|
+
const measuredGroupIdsRef = useRef38(/* @__PURE__ */ new Set());
|
|
34916
|
+
const copyHitsRef = useRef38([]);
|
|
34917
|
+
const liveToolCopyHitRef = useRef38(null);
|
|
34918
|
+
const mountedGroupSpansRef = useRef38([]);
|
|
34919
|
+
const spansSignatureRef = useRef38("");
|
|
34920
|
+
const selectionRef = useRef38({ anchor: null, head: null, inProgress: false });
|
|
34921
|
+
const toolStreamRef = useRef38(toolStream);
|
|
34785
34922
|
toolStreamRef.current = toolStream;
|
|
34786
|
-
const entriesByIdRef =
|
|
34923
|
+
const entriesByIdRef = useRef38(/* @__PURE__ */ new Map());
|
|
34787
34924
|
entriesByIdRef.current = new Map(entries.map((entry) => [entry.id, entry]));
|
|
34788
|
-
const preparedGroupIdsRef =
|
|
34789
|
-
const preparedEstimateWidthRef =
|
|
34925
|
+
const preparedGroupIdsRef = useRef38(null);
|
|
34926
|
+
const preparedEstimateWidthRef = useRef38(null);
|
|
34790
34927
|
const reasoningKey = showModelReasoning === false ? "|r0" : "";
|
|
34791
34928
|
const sageKey = showSageMemoryInject === false ? "|s0" : "";
|
|
34792
34929
|
const cacheKey = (layoutStore ? `${groupIdsKey}|w${termWidth}` : groupIdsKey) + reasoningKey + sageKey;
|
|
@@ -34849,19 +34986,19 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
34849
34986
|
preparedEstimateWidthRef.current = termWidth;
|
|
34850
34987
|
}
|
|
34851
34988
|
const vp = Math.max(1, viewportRows);
|
|
34852
|
-
const [anchor, setAnchor] =
|
|
34853
|
-
const [mountBump, setMountBump] =
|
|
34854
|
-
const prevTermWidthRef =
|
|
34989
|
+
const [anchor, setAnchor] = useState41(null);
|
|
34990
|
+
const [mountBump, setMountBump] = useState41(0);
|
|
34991
|
+
const prevTermWidthRef = useRef38(termWidth);
|
|
34855
34992
|
if (prevTermWidthRef.current !== termWidth) {
|
|
34856
34993
|
prevTermWidthRef.current = termWidth;
|
|
34857
34994
|
setMountBump(0);
|
|
34858
34995
|
}
|
|
34859
|
-
const prevVpRef =
|
|
34996
|
+
const prevVpRef = useRef38(viewportRows);
|
|
34860
34997
|
if (prevVpRef.current !== viewportRows) {
|
|
34861
34998
|
prevVpRef.current = viewportRows;
|
|
34862
34999
|
setMountBump(0);
|
|
34863
35000
|
}
|
|
34864
|
-
const [, setMeasureTick] =
|
|
35001
|
+
const [, setMeasureTick] = useState41(0);
|
|
34865
35002
|
const geometry = {
|
|
34866
35003
|
cache: heightCache,
|
|
34867
35004
|
groupCount: groupedEntries.length,
|
|
@@ -34886,11 +35023,11 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
34886
35023
|
};
|
|
34887
35024
|
}
|
|
34888
35025
|
const scrolled = effectiveAnchor !== null;
|
|
34889
|
-
const geometryRef =
|
|
35026
|
+
const geometryRef = useRef38(geometry);
|
|
34890
35027
|
geometryRef.current = geometry;
|
|
34891
|
-
const effectiveAnchorRef =
|
|
35028
|
+
const effectiveAnchorRef = useRef38(effectiveAnchor);
|
|
34892
35029
|
effectiveAnchorRef.current = effectiveAnchor;
|
|
34893
|
-
const groupIdsRef =
|
|
35030
|
+
const groupIdsRef = useRef38(groupIds);
|
|
34894
35031
|
groupIdsRef.current = groupIds;
|
|
34895
35032
|
const applyAnchor = useCallback25((next) => {
|
|
34896
35033
|
const ids = groupIdsRef.current;
|
|
@@ -35014,21 +35151,21 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35014
35151
|
}),
|
|
35015
35152
|
[applyAnchor, termWidth, vp]
|
|
35016
35153
|
);
|
|
35017
|
-
|
|
35154
|
+
useEffect68(() => {
|
|
35018
35155
|
if (!controllerRef) return void 0;
|
|
35019
35156
|
controllerRef.current = controller;
|
|
35020
35157
|
return () => {
|
|
35021
35158
|
controllerRef.current = null;
|
|
35022
35159
|
};
|
|
35023
35160
|
}, [controllerRef, controller]);
|
|
35024
|
-
const lastReportedScrolled =
|
|
35025
|
-
const onScrollInfoRef =
|
|
35161
|
+
const lastReportedScrolled = useRef38(null);
|
|
35162
|
+
const onScrollInfoRef = useRef38(onScrollInfo);
|
|
35026
35163
|
onScrollInfoRef.current = onScrollInfo;
|
|
35027
|
-
const planStartIdxRef =
|
|
35028
|
-
const requestOlderFiredRef =
|
|
35029
|
-
const onRequestOlderEntriesRef =
|
|
35164
|
+
const planStartIdxRef = useRef38(0);
|
|
35165
|
+
const requestOlderFiredRef = useRef38(false);
|
|
35166
|
+
const onRequestOlderEntriesRef = useRef38(onRequestOlderEntries);
|
|
35030
35167
|
onRequestOlderEntriesRef.current = onRequestOlderEntries;
|
|
35031
|
-
|
|
35168
|
+
useEffect68(() => {
|
|
35032
35169
|
if (lastReportedScrolled.current === scrolled) return;
|
|
35033
35170
|
lastReportedScrolled.current = scrolled;
|
|
35034
35171
|
onScrollInfoRef.current?.({ scrolled });
|
|
@@ -35153,8 +35290,8 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35153
35290
|
}
|
|
35154
35291
|
if (changed) setMeasureTick((tick) => tick + 1);
|
|
35155
35292
|
});
|
|
35156
|
-
return /* @__PURE__ */
|
|
35157
|
-
/* @__PURE__ */
|
|
35293
|
+
return /* @__PURE__ */ jsxs72(Box, { flexDirection: "row", width: viewportWidth, children: [
|
|
35294
|
+
/* @__PURE__ */ jsx75(
|
|
35158
35295
|
Box,
|
|
35159
35296
|
{
|
|
35160
35297
|
flexDirection: "column",
|
|
@@ -35164,7 +35301,7 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35164
35301
|
overflowX: "hidden",
|
|
35165
35302
|
overflowY: "hidden",
|
|
35166
35303
|
justifyContent: scrolled ? "flex-start" : "flex-end",
|
|
35167
|
-
children: /* @__PURE__ */
|
|
35304
|
+
children: /* @__PURE__ */ jsxs72(Box, { flexDirection: "column", flexShrink: 0, marginTop: scrolled && clip2 > 0 ? -clip2 : 0, children: [
|
|
35168
35305
|
renderGroups.map((group) => {
|
|
35169
35306
|
const gid = renderGroupId(group);
|
|
35170
35307
|
const setNode = (node) => {
|
|
@@ -35172,15 +35309,15 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35172
35309
|
else entryNodeRefs.current.delete(gid);
|
|
35173
35310
|
};
|
|
35174
35311
|
if (group.type === "tool-group") {
|
|
35175
|
-
return /* @__PURE__ */
|
|
35312
|
+
return /* @__PURE__ */ jsx75(Box, { ref: setNode, flexShrink: 0, children: /* @__PURE__ */ jsx75(EntryErrorBoundary, { label: "tool group", resetKey: group.data.entries.length, children: /* @__PURE__ */ jsx75(ToolGroup, { data: group.data, termWidth }) }) }, `tool-group-${gid}`);
|
|
35176
35313
|
}
|
|
35177
35314
|
const { entry } = group;
|
|
35178
|
-
const entryEl = /* @__PURE__ */
|
|
35315
|
+
const entryEl = /* @__PURE__ */ jsx75(
|
|
35179
35316
|
EntryErrorBoundary,
|
|
35180
35317
|
{
|
|
35181
35318
|
label: entry.kind,
|
|
35182
35319
|
resetKey: entry.kind === "tool" ? entry.output?.length ?? 0 : "text" in entry ? entry.text.length : 0,
|
|
35183
|
-
children: /* @__PURE__ */
|
|
35320
|
+
children: /* @__PURE__ */ jsx75(
|
|
35184
35321
|
Entry,
|
|
35185
35322
|
{
|
|
35186
35323
|
entry,
|
|
@@ -35196,7 +35333,7 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35196
35333
|
)
|
|
35197
35334
|
}
|
|
35198
35335
|
);
|
|
35199
|
-
return /* @__PURE__ */
|
|
35336
|
+
return /* @__PURE__ */ jsx75(
|
|
35200
35337
|
Box,
|
|
35201
35338
|
{
|
|
35202
35339
|
ref: setNode,
|
|
@@ -35207,7 +35344,7 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35207
35344
|
entry.id
|
|
35208
35345
|
);
|
|
35209
35346
|
}),
|
|
35210
|
-
plan.mountTail && toolTail && toolStream ? /* @__PURE__ */
|
|
35347
|
+
plan.mountTail && toolTail && toolStream ? /* @__PURE__ */ jsx75(
|
|
35211
35348
|
ToolStreamBox,
|
|
35212
35349
|
{
|
|
35213
35350
|
name: toolStream.name,
|
|
@@ -35219,7 +35356,7 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35219
35356
|
] })
|
|
35220
35357
|
}
|
|
35221
35358
|
),
|
|
35222
|
-
/* @__PURE__ */
|
|
35359
|
+
/* @__PURE__ */ jsx75(
|
|
35223
35360
|
Scrollbar,
|
|
35224
35361
|
{
|
|
35225
35362
|
rows: vp,
|
|
@@ -35233,7 +35370,7 @@ var ScrollableHistory = memo3(function ScrollableHistory2({
|
|
|
35233
35370
|
});
|
|
35234
35371
|
|
|
35235
35372
|
// src/components/sidebar-content.tsx
|
|
35236
|
-
import { Fragment as Fragment26, jsx as
|
|
35373
|
+
import { Fragment as Fragment26, jsx as jsx76, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
35237
35374
|
function trunc2(s2, max) {
|
|
35238
35375
|
if (s2.length <= max) return s2;
|
|
35239
35376
|
return `${s2.slice(0, Math.max(1, max - 1))}\u2026`;
|
|
@@ -35318,10 +35455,10 @@ function SectionHeader({
|
|
|
35318
35455
|
const badgeW = badge ? displayWidth(badge) + 1 : 0;
|
|
35319
35456
|
const fitsBadge = !!badge && innerWidth - leftW - badgeW >= 0;
|
|
35320
35457
|
const fillCount = Math.max(0, innerWidth - leftW - (fitsBadge ? badgeW : 0));
|
|
35321
|
-
return /* @__PURE__ */
|
|
35322
|
-
/* @__PURE__ */
|
|
35323
|
-
/* @__PURE__ */
|
|
35324
|
-
fitsBadge ? /* @__PURE__ */
|
|
35458
|
+
return /* @__PURE__ */ jsxs73(Box, { children: [
|
|
35459
|
+
/* @__PURE__ */ jsx76(Text, { color, bold: true, children: left }),
|
|
35460
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.borderSubtle, children: "\xB7".repeat(fillCount) }),
|
|
35461
|
+
fitsBadge ? /* @__PURE__ */ jsxs73(Text, { color: badgeColor ?? color, bold: true, children: [
|
|
35325
35462
|
" ",
|
|
35326
35463
|
badge
|
|
35327
35464
|
] }) : null
|
|
@@ -35332,7 +35469,7 @@ function Card({
|
|
|
35332
35469
|
marginBottom = 1,
|
|
35333
35470
|
children
|
|
35334
35471
|
}) {
|
|
35335
|
-
return /* @__PURE__ */
|
|
35472
|
+
return /* @__PURE__ */ jsx76(
|
|
35336
35473
|
Box,
|
|
35337
35474
|
{
|
|
35338
35475
|
flexDirection: "column",
|
|
@@ -35393,19 +35530,19 @@ function SidebarContent({
|
|
|
35393
35530
|
const hiddenAgentCount = runningSubagents.length - agentCap;
|
|
35394
35531
|
const running = fleetCounts?.running ?? runningSubagents.length;
|
|
35395
35532
|
const mission = showSwarmSection ? buildMissionRows(todos, SIDEBAR_MISSION_ROWS) : { rows: [], overflow: 0, done: 0, total: 0 };
|
|
35396
|
-
return /* @__PURE__ */
|
|
35533
|
+
return /* @__PURE__ */ jsxs73(
|
|
35397
35534
|
Box,
|
|
35398
35535
|
{
|
|
35399
35536
|
flexDirection: "column",
|
|
35400
35537
|
gap: 0,
|
|
35401
35538
|
marginTop: scrollOffset > 0 ? -scrollOffset : void 0,
|
|
35402
35539
|
children: [
|
|
35403
|
-
focused ? /* @__PURE__ */
|
|
35404
|
-
/* @__PURE__ */
|
|
35405
|
-
/* @__PURE__ */
|
|
35540
|
+
focused ? /* @__PURE__ */ jsxs73(Box, { width: innerWidth, marginBottom: 1, children: [
|
|
35541
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.accent, bold: true, children: "\u2191\u2193" }),
|
|
35542
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.textMuted, children: " scroll \xB7 Shift+Tab exits" })
|
|
35406
35543
|
] }) : null,
|
|
35407
|
-
/* @__PURE__ */
|
|
35408
|
-
/* @__PURE__ */
|
|
35544
|
+
/* @__PURE__ */ jsxs73(Card, { innerWidth, children: [
|
|
35545
|
+
/* @__PURE__ */ jsx76(
|
|
35409
35546
|
SectionHeader,
|
|
35410
35547
|
{
|
|
35411
35548
|
glyph: glyphs.context,
|
|
@@ -35416,21 +35553,21 @@ function SidebarContent({
|
|
|
35416
35553
|
innerWidth
|
|
35417
35554
|
}
|
|
35418
35555
|
),
|
|
35419
|
-
contextWindow ? /* @__PURE__ */
|
|
35420
|
-
/* @__PURE__ */
|
|
35421
|
-
/* @__PURE__ */
|
|
35422
|
-
/* @__PURE__ */
|
|
35556
|
+
contextWindow ? /* @__PURE__ */ jsxs73(Fragment26, { children: [
|
|
35557
|
+
/* @__PURE__ */ jsxs73(Box, { children: [
|
|
35558
|
+
/* @__PURE__ */ jsx76(Text, { color: ctxColor, children: meter.filled }),
|
|
35559
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.borderSubtle, children: meter.empty })
|
|
35423
35560
|
] }),
|
|
35424
|
-
/* @__PURE__ */
|
|
35561
|
+
/* @__PURE__ */ jsxs73(Text, { color: theme.textMuted, wrap: "truncate", children: [
|
|
35425
35562
|
fmtTok(contextWindow.used),
|
|
35426
35563
|
" / ",
|
|
35427
35564
|
fmtTok(contextWindow.max),
|
|
35428
35565
|
" tokens"
|
|
35429
35566
|
] })
|
|
35430
|
-
] }) : /* @__PURE__ */
|
|
35567
|
+
] }) : /* @__PURE__ */ jsx76(Text, { color: theme.textMuted, children: "\u2014" })
|
|
35431
35568
|
] }),
|
|
35432
|
-
provider && model ? /* @__PURE__ */
|
|
35433
|
-
/* @__PURE__ */
|
|
35569
|
+
provider && model ? /* @__PURE__ */ jsxs73(Card, { innerWidth, children: [
|
|
35570
|
+
/* @__PURE__ */ jsx76(
|
|
35434
35571
|
SectionHeader,
|
|
35435
35572
|
{
|
|
35436
35573
|
glyph: glyphs.tools,
|
|
@@ -35439,10 +35576,10 @@ function SidebarContent({
|
|
|
35439
35576
|
innerWidth
|
|
35440
35577
|
}
|
|
35441
35578
|
),
|
|
35442
|
-
/* @__PURE__ */
|
|
35579
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.textSecondary, wrap: "truncate", children: trunc2(`${provider}/${model}`, innerWidth) })
|
|
35443
35580
|
] }) : null,
|
|
35444
|
-
/* @__PURE__ */
|
|
35445
|
-
/* @__PURE__ */
|
|
35581
|
+
showSwarmSection ? /* @__PURE__ */ jsxs73(Card, { innerWidth, children: [
|
|
35582
|
+
/* @__PURE__ */ jsx76(
|
|
35446
35583
|
SectionHeader,
|
|
35447
35584
|
{
|
|
35448
35585
|
glyph: glyphs.fleet,
|
|
@@ -35453,33 +35590,33 @@ function SidebarContent({
|
|
|
35453
35590
|
innerWidth
|
|
35454
35591
|
}
|
|
35455
35592
|
),
|
|
35456
|
-
|
|
35457
|
-
/* @__PURE__ */
|
|
35458
|
-
/* @__PURE__ */
|
|
35459
|
-
|
|
35460
|
-
|
|
35461
|
-
|
|
35462
|
-
|
|
35463
|
-
|
|
35464
|
-
|
|
35465
|
-
|
|
35466
|
-
] })
|
|
35467
|
-
] }),
|
|
35468
|
-
shownAgents.length > 0 ? /* @__PURE__ */ jsxs72(Box, { flexDirection: "column", width: innerWidth, marginBottom: 1, children: [
|
|
35593
|
+
/* @__PURE__ */ jsxs73(Box, { children: [
|
|
35594
|
+
/* @__PURE__ */ jsx76(Text, { color: running > 0 ? theme.success : theme.textMuted, children: "\u258E" }),
|
|
35595
|
+
/* @__PURE__ */ jsx76(
|
|
35596
|
+
Text,
|
|
35597
|
+
{
|
|
35598
|
+
color: running > 0 ? theme.textSecondary : theme.textMuted,
|
|
35599
|
+
wrap: "truncate",
|
|
35600
|
+
children: running > 0 ? ` ${running} running` : " idle"
|
|
35601
|
+
}
|
|
35602
|
+
)
|
|
35603
|
+
] }),
|
|
35469
35604
|
shownAgents.map((entry) => {
|
|
35470
35605
|
const { icon, color } = statusGlyph(entry);
|
|
35471
35606
|
const isRunning = entry.status === "running";
|
|
35472
|
-
const name = trunc2(entry.name || entry.id, innerWidth -
|
|
35607
|
+
const name = trunc2(entry.name || entry.id, innerWidth - 8);
|
|
35473
35608
|
const ctxPctAgent = entry.ctxPct != null ? `${Math.round(entry.ctxPct * 100)}%` : "";
|
|
35474
35609
|
const statusLabel = entry.status === "running" ? "running" : entry.status === "idle" ? "idle" : entry.status;
|
|
35475
|
-
const tool = entry.currentTool?.name ? trunc2(entry.currentTool.name, innerWidth - statusLabel.length -
|
|
35476
|
-
return /* @__PURE__ */
|
|
35477
|
-
/* @__PURE__ */
|
|
35478
|
-
/* @__PURE__ */
|
|
35610
|
+
const tool = entry.currentTool?.name ? trunc2(entry.currentTool.name, innerWidth - statusLabel.length - 6) : "";
|
|
35611
|
+
return /* @__PURE__ */ jsxs73(Box, { flexDirection: "column", children: [
|
|
35612
|
+
/* @__PURE__ */ jsxs73(Box, { flexDirection: "row", children: [
|
|
35613
|
+
/* @__PURE__ */ jsx76(Text, { color, children: "\u258E" }),
|
|
35614
|
+
/* @__PURE__ */ jsxs73(Text, { color, children: [
|
|
35615
|
+
" ",
|
|
35479
35616
|
icon,
|
|
35480
35617
|
" "
|
|
35481
35618
|
] }),
|
|
35482
|
-
/* @__PURE__ */
|
|
35619
|
+
/* @__PURE__ */ jsx76(
|
|
35483
35620
|
Text,
|
|
35484
35621
|
{
|
|
35485
35622
|
color: isRunning ? theme.textPrimary : theme.textSecondary,
|
|
@@ -35488,34 +35625,27 @@ function SidebarContent({
|
|
|
35488
35625
|
children: name
|
|
35489
35626
|
}
|
|
35490
35627
|
),
|
|
35491
|
-
|
|
35492
|
-
|
|
35493
|
-
{
|
|
35494
|
-
color: entry.ctxPct != null ? contextBarColor(entry.ctxPct) : theme.textMuted,
|
|
35495
|
-
children: [
|
|
35496
|
-
" ",
|
|
35497
|
-
ctxPctAgent
|
|
35498
|
-
]
|
|
35499
|
-
}
|
|
35500
|
-
) : null
|
|
35628
|
+
/* @__PURE__ */ jsx76(Box, { flexGrow: 1 }),
|
|
35629
|
+
ctxPctAgent ? /* @__PURE__ */ jsx76(Text, { color: contextBarColor(entry.ctxPct ?? 0), children: ctxPctAgent }) : null
|
|
35501
35630
|
] }),
|
|
35502
|
-
/* @__PURE__ */
|
|
35503
|
-
/* @__PURE__ */
|
|
35504
|
-
/* @__PURE__ */
|
|
35631
|
+
/* @__PURE__ */ jsxs73(Box, { flexDirection: "row", children: [
|
|
35632
|
+
/* @__PURE__ */ jsx76(Text, { color, children: "\u258E" }),
|
|
35633
|
+
/* @__PURE__ */ jsxs73(Text, { color: theme.textMuted, wrap: "truncate", children: [
|
|
35634
|
+
" ",
|
|
35505
35635
|
statusLabel,
|
|
35506
35636
|
tool ? ` \xB7 ${tool}` : ""
|
|
35507
35637
|
] })
|
|
35508
35638
|
] })
|
|
35509
35639
|
] }, entry.id);
|
|
35510
35640
|
}),
|
|
35511
|
-
hiddenAgentCount > 0 ? /* @__PURE__ */
|
|
35512
|
-
" +",
|
|
35641
|
+
hiddenAgentCount > 0 ? /* @__PURE__ */ jsxs73(Text, { color: theme.textMuted, children: [
|
|
35642
|
+
"\u258E +",
|
|
35513
35643
|
hiddenAgentCount,
|
|
35514
35644
|
" more"
|
|
35515
35645
|
] }) : null
|
|
35516
35646
|
] }) : null,
|
|
35517
|
-
mission.total > 0 ? /* @__PURE__ */
|
|
35518
|
-
/* @__PURE__ */
|
|
35647
|
+
mission.total > 0 ? /* @__PURE__ */ jsxs73(Card, { innerWidth, children: [
|
|
35648
|
+
/* @__PURE__ */ jsx76(
|
|
35519
35649
|
SectionHeader,
|
|
35520
35650
|
{
|
|
35521
35651
|
glyph: glyphs.queue,
|
|
@@ -35528,40 +35658,40 @@ function SidebarContent({
|
|
|
35528
35658
|
),
|
|
35529
35659
|
mission.rows.map((m) => {
|
|
35530
35660
|
if (m.status === "completed") {
|
|
35531
|
-
return /* @__PURE__ */
|
|
35532
|
-
/* @__PURE__ */
|
|
35661
|
+
return /* @__PURE__ */ jsxs73(Box, { width: innerWidth, flexDirection: "row", children: [
|
|
35662
|
+
/* @__PURE__ */ jsxs73(Text, { color: theme.success, children: [
|
|
35533
35663
|
glyphs.success,
|
|
35534
35664
|
" "
|
|
35535
35665
|
] }),
|
|
35536
|
-
/* @__PURE__ */
|
|
35666
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.textMuted, dimColor: true, strikethrough: true, children: m.label })
|
|
35537
35667
|
] }, m.id);
|
|
35538
35668
|
}
|
|
35539
35669
|
if (m.status === "in_progress") {
|
|
35540
|
-
return /* @__PURE__ */
|
|
35541
|
-
/* @__PURE__ */
|
|
35670
|
+
return /* @__PURE__ */ jsxs73(Box, { width: innerWidth, flexDirection: "row", children: [
|
|
35671
|
+
/* @__PURE__ */ jsxs73(Text, { color: theme.accent, children: [
|
|
35542
35672
|
glyphs.running,
|
|
35543
35673
|
" "
|
|
35544
35674
|
] }),
|
|
35545
|
-
/* @__PURE__ */
|
|
35675
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.textPrimary, bold: true, children: m.label })
|
|
35546
35676
|
] }, m.id);
|
|
35547
35677
|
}
|
|
35548
|
-
return /* @__PURE__ */
|
|
35549
|
-
/* @__PURE__ */
|
|
35678
|
+
return /* @__PURE__ */ jsxs73(Box, { width: innerWidth, flexDirection: "row", children: [
|
|
35679
|
+
/* @__PURE__ */ jsxs73(Text, { color: theme.textMuted, children: [
|
|
35550
35680
|
glyphs.pending,
|
|
35551
35681
|
" "
|
|
35552
35682
|
] }),
|
|
35553
|
-
/* @__PURE__ */
|
|
35683
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.textSecondary, children: m.label })
|
|
35554
35684
|
] }, m.id);
|
|
35555
35685
|
}),
|
|
35556
|
-
mission.overflow > 0 ? /* @__PURE__ */
|
|
35686
|
+
mission.overflow > 0 ? /* @__PURE__ */ jsxs73(Text, { color: theme.textMuted, dimColor: true, children: [
|
|
35557
35687
|
" ",
|
|
35558
35688
|
"+",
|
|
35559
35689
|
mission.overflow,
|
|
35560
35690
|
" more"
|
|
35561
35691
|
] }) : null
|
|
35562
35692
|
] }) : null,
|
|
35563
|
-
(liveSessions?.length ?? 0) > 0 || (resumeSessions?.length ?? 0) > 0 ? /* @__PURE__ */
|
|
35564
|
-
/* @__PURE__ */
|
|
35693
|
+
(liveSessions?.length ?? 0) > 0 || (resumeSessions?.length ?? 0) > 0 ? /* @__PURE__ */ jsxs73(Card, { innerWidth, marginBottom: 0, children: [
|
|
35694
|
+
/* @__PURE__ */ jsx76(
|
|
35565
35695
|
SectionHeader,
|
|
35566
35696
|
{
|
|
35567
35697
|
glyph: glyphs.sessions,
|
|
@@ -35572,7 +35702,7 @@ function SidebarContent({
|
|
|
35572
35702
|
innerWidth
|
|
35573
35703
|
}
|
|
35574
35704
|
),
|
|
35575
|
-
liveSessions && liveSessions.length > 0 ? /* @__PURE__ */
|
|
35705
|
+
liveSessions && liveSessions.length > 0 ? /* @__PURE__ */ jsx76(Box, { flexDirection: "column", children: liveSessions.slice(0, 3).map((s2) => {
|
|
35576
35706
|
const isCurrent = isCurrentSession(
|
|
35577
35707
|
s2.sessionId,
|
|
35578
35708
|
currentSessionId
|
|
@@ -35581,12 +35711,12 @@ function SidebarContent({
|
|
|
35581
35711
|
const color = liveSessionColor(s2.status);
|
|
35582
35712
|
const name = trunc2(s2.projectName, innerWidth - 6);
|
|
35583
35713
|
const agents = s2.agentCount > 0 ? ` ${s2.agentCount}a` : "";
|
|
35584
|
-
return /* @__PURE__ */
|
|
35585
|
-
/* @__PURE__ */
|
|
35714
|
+
return /* @__PURE__ */ jsxs73(Box, { flexDirection: "row", children: [
|
|
35715
|
+
/* @__PURE__ */ jsxs73(Text, { color, children: [
|
|
35586
35716
|
icon,
|
|
35587
35717
|
" "
|
|
35588
35718
|
] }),
|
|
35589
|
-
/* @__PURE__ */
|
|
35719
|
+
/* @__PURE__ */ jsx76(
|
|
35590
35720
|
Text,
|
|
35591
35721
|
{
|
|
35592
35722
|
color: isCurrent ? theme.accent : theme.textSecondary,
|
|
@@ -35595,10 +35725,10 @@ function SidebarContent({
|
|
|
35595
35725
|
children: name
|
|
35596
35726
|
}
|
|
35597
35727
|
),
|
|
35598
|
-
/* @__PURE__ */
|
|
35728
|
+
/* @__PURE__ */ jsx76(Text, { color: theme.textMuted, children: agents })
|
|
35599
35729
|
] }, s2.sessionId);
|
|
35600
35730
|
}) }) : null,
|
|
35601
|
-
resumeSessions && resumeSessions.length > 0 ? /* @__PURE__ */
|
|
35731
|
+
resumeSessions && resumeSessions.length > 0 ? /* @__PURE__ */ jsx76(
|
|
35602
35732
|
Box,
|
|
35603
35733
|
{
|
|
35604
35734
|
flexDirection: "column",
|
|
@@ -35615,12 +35745,12 @@ function SidebarContent({
|
|
|
35615
35745
|
innerWidth - 8
|
|
35616
35746
|
);
|
|
35617
35747
|
const rel = fmtRelative(rs.lastActivityAt ?? rs.endedAt);
|
|
35618
|
-
return /* @__PURE__ */
|
|
35619
|
-
/* @__PURE__ */
|
|
35748
|
+
return /* @__PURE__ */ jsxs73(Box, { flexDirection: "row", children: [
|
|
35749
|
+
/* @__PURE__ */ jsxs73(Text, { color: badge ? badge.color : theme.textMuted, children: [
|
|
35620
35750
|
badge ? badge.label : "\xB7",
|
|
35621
35751
|
" "
|
|
35622
35752
|
] }),
|
|
35623
|
-
/* @__PURE__ */
|
|
35753
|
+
/* @__PURE__ */ jsx76(
|
|
35624
35754
|
Text,
|
|
35625
35755
|
{
|
|
35626
35756
|
color: isCurrent ? theme.accent : theme.textSecondary,
|
|
@@ -35629,7 +35759,7 @@ function SidebarContent({
|
|
|
35629
35759
|
children: title
|
|
35630
35760
|
}
|
|
35631
35761
|
),
|
|
35632
|
-
rel ? /* @__PURE__ */
|
|
35762
|
+
rel ? /* @__PURE__ */ jsxs73(Text, { color: theme.textMuted, children: [
|
|
35633
35763
|
" ",
|
|
35634
35764
|
rel
|
|
35635
35765
|
] }) : null
|
|
@@ -35644,8 +35774,8 @@ function SidebarContent({
|
|
|
35644
35774
|
}
|
|
35645
35775
|
|
|
35646
35776
|
// src/components/sidebar-panel-frame.tsx
|
|
35647
|
-
import { useEffect as
|
|
35648
|
-
import { jsx as
|
|
35777
|
+
import { useEffect as useEffect69, useState as useState42 } from "react";
|
|
35778
|
+
import { jsx as jsx77, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
35649
35779
|
function trunc3(s2, max) {
|
|
35650
35780
|
return truncateDisplay(s2, max);
|
|
35651
35781
|
}
|
|
@@ -35662,10 +35792,10 @@ function SidebarSectionHeader({
|
|
|
35662
35792
|
const badgeW = badge ? displayWidth(badge) + 1 : 0;
|
|
35663
35793
|
const fitsBadge = !!badge && innerWidth - leftW - badgeW >= 0;
|
|
35664
35794
|
const fillCount = Math.max(0, innerWidth - leftW - (fitsBadge ? badgeW : 0));
|
|
35665
|
-
return /* @__PURE__ */
|
|
35666
|
-
/* @__PURE__ */
|
|
35667
|
-
/* @__PURE__ */
|
|
35668
|
-
fitsBadge ? /* @__PURE__ */
|
|
35795
|
+
return /* @__PURE__ */ jsxs74(Box, { children: [
|
|
35796
|
+
/* @__PURE__ */ jsx77(Text, { color, bold: true, children: left }),
|
|
35797
|
+
/* @__PURE__ */ jsx77(Text, { color: theme.borderSubtle, children: "\xB7".repeat(fillCount) }),
|
|
35798
|
+
fitsBadge ? /* @__PURE__ */ jsxs74(Text, { color: badgeColor ?? color, bold: true, children: [
|
|
35669
35799
|
" ",
|
|
35670
35800
|
badge
|
|
35671
35801
|
] }) : null
|
|
@@ -35676,7 +35806,7 @@ function SidebarPanelCard({
|
|
|
35676
35806
|
marginBottom = 1,
|
|
35677
35807
|
children
|
|
35678
35808
|
}) {
|
|
35679
|
-
return /* @__PURE__ */
|
|
35809
|
+
return /* @__PURE__ */ jsx77(
|
|
35680
35810
|
Box,
|
|
35681
35811
|
{
|
|
35682
35812
|
flexDirection: "column",
|
|
@@ -35699,24 +35829,24 @@ function SidebarPanelFrame({
|
|
|
35699
35829
|
}) {
|
|
35700
35830
|
const innerWidth = Math.max(8, width);
|
|
35701
35831
|
const showKicker = !!kicker && innerWidth >= 24;
|
|
35702
|
-
return /* @__PURE__ */
|
|
35703
|
-
/* @__PURE__ */
|
|
35704
|
-
/* @__PURE__ */
|
|
35705
|
-
/* @__PURE__ */
|
|
35832
|
+
return /* @__PURE__ */ jsxs74(Box, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
35833
|
+
/* @__PURE__ */ jsxs74(Box, { height: 1, width: innerWidth, children: [
|
|
35834
|
+
/* @__PURE__ */ jsx77(Text, { color: accent, bold: true, children: "\u258C" }),
|
|
35835
|
+
/* @__PURE__ */ jsx77(Text, { color: accent, bold: true, wrap: "truncate", children: trunc3(` ${icon} ${title}`, Math.max(1, innerWidth - 1)) })
|
|
35706
35836
|
] }),
|
|
35707
|
-
showKicker || right ? /* @__PURE__ */
|
|
35708
|
-
showKicker ? /* @__PURE__ */
|
|
35709
|
-
/* @__PURE__ */
|
|
35710
|
-
right ? /* @__PURE__ */
|
|
35837
|
+
showKicker || right ? /* @__PURE__ */ jsxs74(Box, { height: 1, width: innerWidth, children: [
|
|
35838
|
+
showKicker ? /* @__PURE__ */ jsx77(Text, { color: theme.textMuted, dimColor: true, wrap: "truncate", children: trunc3(kicker, Math.max(1, right ? Math.floor(innerWidth * 0.55) : innerWidth)) }) : null,
|
|
35839
|
+
/* @__PURE__ */ jsx77(Box, { flexGrow: 1 }),
|
|
35840
|
+
right ? /* @__PURE__ */ jsx77(Text, { wrap: "truncate", children: right }) : null
|
|
35711
35841
|
] }) : null,
|
|
35712
|
-
/* @__PURE__ */
|
|
35713
|
-
/* @__PURE__ */
|
|
35714
|
-
footer ? /* @__PURE__ */
|
|
35842
|
+
/* @__PURE__ */ jsx77(Text, { color: accent, wrap: "truncate", children: "\u2500".repeat(innerWidth) }),
|
|
35843
|
+
/* @__PURE__ */ jsx77(Box, { flexDirection: "column", children }),
|
|
35844
|
+
footer ? /* @__PURE__ */ jsx77(Box, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx77(Text, { wrap: "truncate", dimColor: true, children: footer }) }) : null
|
|
35715
35845
|
] });
|
|
35716
35846
|
}
|
|
35717
35847
|
|
|
35718
35848
|
// src/components/sidebar-panels.tsx
|
|
35719
|
-
import { Fragment as Fragment27, jsx as
|
|
35849
|
+
import { Fragment as Fragment27, jsx as jsx78, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
35720
35850
|
function fleetStatusVisual(status) {
|
|
35721
35851
|
switch (status) {
|
|
35722
35852
|
case "running":
|
|
@@ -35784,7 +35914,7 @@ function ProjectPickerSidebar({
|
|
|
35784
35914
|
const selectableCount = items.filter((item) => item.key !== "__divider__").length;
|
|
35785
35915
|
const start = Math.max(0, Math.min(selected - 2, Math.max(0, items.length - 5)));
|
|
35786
35916
|
const visible = items.slice(start, start + 5);
|
|
35787
|
-
return /* @__PURE__ */
|
|
35917
|
+
return /* @__PURE__ */ jsxs75(
|
|
35788
35918
|
SidebarPanelFrame,
|
|
35789
35919
|
{
|
|
35790
35920
|
accent: theme.brand,
|
|
@@ -35792,13 +35922,13 @@ function ProjectPickerSidebar({
|
|
|
35792
35922
|
title: "PROJECT",
|
|
35793
35923
|
width,
|
|
35794
35924
|
kicker: filter ? trunc3(filter, 20) : "switcher",
|
|
35795
|
-
right: /* @__PURE__ */
|
|
35925
|
+
right: /* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
35796
35926
|
projectCount,
|
|
35797
35927
|
" projects"
|
|
35798
35928
|
] }),
|
|
35799
35929
|
children: [
|
|
35800
|
-
/* @__PURE__ */
|
|
35801
|
-
/* @__PURE__ */
|
|
35930
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
35931
|
+
/* @__PURE__ */ jsx78(
|
|
35802
35932
|
SidebarSectionHeader,
|
|
35803
35933
|
{
|
|
35804
35934
|
glyph: glyphs.folder,
|
|
@@ -35808,10 +35938,10 @@ function ProjectPickerSidebar({
|
|
|
35808
35938
|
innerWidth: inner
|
|
35809
35939
|
}
|
|
35810
35940
|
),
|
|
35811
|
-
currentProject ? /* @__PURE__ */
|
|
35941
|
+
currentProject ? /* @__PURE__ */ jsx78(Text, { color: theme.textPrimary, bold: true, wrap: "truncate", children: trunc3(currentProject, inner - 2) }) : /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "\u2014" })
|
|
35812
35942
|
] }),
|
|
35813
|
-
/* @__PURE__ */
|
|
35814
|
-
/* @__PURE__ */
|
|
35943
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: [
|
|
35944
|
+
/* @__PURE__ */ jsx78(
|
|
35815
35945
|
SidebarSectionHeader,
|
|
35816
35946
|
{
|
|
35817
35947
|
glyph: glyphs.folder,
|
|
@@ -35821,31 +35951,31 @@ function ProjectPickerSidebar({
|
|
|
35821
35951
|
innerWidth: inner
|
|
35822
35952
|
}
|
|
35823
35953
|
),
|
|
35824
|
-
visible.length === 0 ? /* @__PURE__ */
|
|
35954
|
+
visible.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no matching projects" }) : visible.map((item, offset) => {
|
|
35825
35955
|
const index = start + offset;
|
|
35826
35956
|
const isSelected = index === selected;
|
|
35827
35957
|
if (item.key === "__divider__") {
|
|
35828
|
-
return /* @__PURE__ */
|
|
35958
|
+
return /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "\u2500".repeat(inner) }, `${item.key}-${index}`);
|
|
35829
35959
|
}
|
|
35830
35960
|
const icon = item.kind === "project" ? glyphs.folder : glyphs.task;
|
|
35831
35961
|
const accent = item.kind === "project" ? theme.brand : theme.warn;
|
|
35832
|
-
return /* @__PURE__ */
|
|
35833
|
-
/* @__PURE__ */
|
|
35834
|
-
/* @__PURE__ */
|
|
35835
|
-
/* @__PURE__ */
|
|
35962
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "column", children: [
|
|
35963
|
+
/* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
35964
|
+
/* @__PURE__ */ jsx78(Text, { color: isSelected ? accent : theme.textMuted, children: isSelected ? "\u258E" : " " }),
|
|
35965
|
+
/* @__PURE__ */ jsxs75(Text, { color: accent, children: [
|
|
35836
35966
|
" ",
|
|
35837
35967
|
icon,
|
|
35838
35968
|
" "
|
|
35839
35969
|
] }),
|
|
35840
|
-
/* @__PURE__ */
|
|
35970
|
+
/* @__PURE__ */ jsx78(Text, { color: isSelected ? theme.textPrimary : theme.textSecondary, bold: isSelected, wrap: "truncate", children: trunc3(item.label, Math.max(4, inner - 6)) })
|
|
35841
35971
|
] }),
|
|
35842
|
-
item.subtitle ? /* @__PURE__ */
|
|
35972
|
+
item.subtitle ? /* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
35843
35973
|
" \u2514 ",
|
|
35844
35974
|
trunc3(item.subtitle, Math.max(4, inner - 4))
|
|
35845
35975
|
] }) : null
|
|
35846
35976
|
] }, item.key);
|
|
35847
35977
|
}),
|
|
35848
|
-
hint ? /* @__PURE__ */
|
|
35978
|
+
hint ? /* @__PURE__ */ jsxs75(Text, { color: theme.warn, children: [
|
|
35849
35979
|
glyphs.warning,
|
|
35850
35980
|
" ",
|
|
35851
35981
|
trunc3(hint, inner - 2)
|
|
@@ -35865,7 +35995,7 @@ function FleetPanelSidebar({
|
|
|
35865
35995
|
const leader = all.find((e) => e.id === "leader");
|
|
35866
35996
|
const subagents = all.filter((e) => e !== leader && e.status === "running");
|
|
35867
35997
|
const rows = [...leader ? [leader] : [], ...subagents].slice(0, 10);
|
|
35868
|
-
return /* @__PURE__ */
|
|
35998
|
+
return /* @__PURE__ */ jsx78(
|
|
35869
35999
|
SidebarPanelFrame,
|
|
35870
36000
|
{
|
|
35871
36001
|
accent: theme.monitor.fleet,
|
|
@@ -35873,13 +36003,13 @@ function FleetPanelSidebar({
|
|
|
35873
36003
|
title: "AGENT SWARM",
|
|
35874
36004
|
width,
|
|
35875
36005
|
kicker: "fleet",
|
|
35876
|
-
right: /* @__PURE__ */
|
|
35877
|
-
children: /* @__PURE__ */
|
|
36006
|
+
right: /* @__PURE__ */ jsx78(Text, { color: runningCount > 0 ? theme.success : theme.textMuted, bold: true, children: runningCount > 0 ? `${runningCount} LIVE` : "IDLE" }),
|
|
36007
|
+
children: /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: rows.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no active agents" }) : rows.map((e) => {
|
|
35878
36008
|
const v = fleetStatusVisual(e.status);
|
|
35879
36009
|
const name = trunc3(e.name || e.id, inner - 8);
|
|
35880
|
-
return /* @__PURE__ */
|
|
35881
|
-
/* @__PURE__ */
|
|
35882
|
-
/* @__PURE__ */
|
|
36010
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36011
|
+
/* @__PURE__ */ jsx78(Text, { color: v.color, children: v.glyph }),
|
|
36012
|
+
/* @__PURE__ */ jsxs75(Text, { color: e.status === "running" ? theme.textPrimary : theme.textSecondary, children: [
|
|
35883
36013
|
" ",
|
|
35884
36014
|
name
|
|
35885
36015
|
] })
|
|
@@ -35901,7 +36031,7 @@ function AgentsPanelSidebar({
|
|
|
35901
36031
|
const failed = all.filter((e) => e.status === "failed" || e.status === "timeout");
|
|
35902
36032
|
const hotAgent = [...running].sort((a, b) => (b.ctxPct ?? 0) - (a.ctxPct ?? 0))[0];
|
|
35903
36033
|
const live = running.slice(0, 10);
|
|
35904
|
-
return /* @__PURE__ */
|
|
36034
|
+
return /* @__PURE__ */ jsxs75(
|
|
35905
36035
|
SidebarPanelFrame,
|
|
35906
36036
|
{
|
|
35907
36037
|
accent: theme.monitor.agents,
|
|
@@ -35909,19 +36039,19 @@ function AgentsPanelSidebar({
|
|
|
35909
36039
|
title: "AGENTS",
|
|
35910
36040
|
width,
|
|
35911
36041
|
kicker: "live ops",
|
|
35912
|
-
right: /* @__PURE__ */
|
|
35913
|
-
/* @__PURE__ */
|
|
35914
|
-
/* @__PURE__ */
|
|
35915
|
-
/* @__PURE__ */
|
|
35916
|
-
failed.length > 0 ? /* @__PURE__ */
|
|
35917
|
-
/* @__PURE__ */
|
|
35918
|
-
/* @__PURE__ */
|
|
36042
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36043
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.warn, children: running.length }),
|
|
36044
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36045
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.success, children: done.length }),
|
|
36046
|
+
failed.length > 0 ? /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36047
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36048
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.error, children: failed.length })
|
|
35919
36049
|
] }) : null
|
|
35920
36050
|
] }),
|
|
35921
36051
|
footer: `F3 details \xB7 $${totalCost.toFixed(4)}`,
|
|
35922
36052
|
children: [
|
|
35923
|
-
/* @__PURE__ */
|
|
35924
|
-
/* @__PURE__ */
|
|
36053
|
+
/* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 1, children: hotAgent ? /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36054
|
+
/* @__PURE__ */ jsx78(
|
|
35925
36055
|
SidebarSectionHeader,
|
|
35926
36056
|
{
|
|
35927
36057
|
glyph: glyphs.warning,
|
|
@@ -35930,14 +36060,14 @@ function AgentsPanelSidebar({
|
|
|
35930
36060
|
innerWidth: inner
|
|
35931
36061
|
}
|
|
35932
36062
|
),
|
|
35933
|
-
/* @__PURE__ */
|
|
35934
|
-
/* @__PURE__ */
|
|
36063
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textPrimary, wrap: "truncate", bold: true, children: trunc3(hotAgent.name || hotAgent.id, inner - 4) }),
|
|
36064
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, wrap: "truncate", children: trunc3(
|
|
35935
36065
|
`ctx ${Math.round((hotAgent.ctxPct ?? 0) * 100)}% \xB7 ${hotAgent.currentTool?.name ?? "idle"}`,
|
|
35936
36066
|
inner
|
|
35937
36067
|
) })
|
|
35938
|
-
] }) : /* @__PURE__ */
|
|
35939
|
-
/* @__PURE__ */
|
|
35940
|
-
/* @__PURE__ */
|
|
36068
|
+
] }) : /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no live agents" }) }),
|
|
36069
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: [
|
|
36070
|
+
/* @__PURE__ */ jsx78(
|
|
35941
36071
|
SidebarSectionHeader,
|
|
35942
36072
|
{
|
|
35943
36073
|
glyph: glyphs.fleet,
|
|
@@ -35952,12 +36082,12 @@ function AgentsPanelSidebar({
|
|
|
35952
36082
|
const v = fleetStatusVisual(e.status);
|
|
35953
36083
|
const elapsed = nowTick - e.startedAt;
|
|
35954
36084
|
const name = trunc3(e.name || e.id, inner - 12);
|
|
35955
|
-
return /* @__PURE__ */
|
|
35956
|
-
/* @__PURE__ */
|
|
35957
|
-
/* @__PURE__ */
|
|
35958
|
-
/* @__PURE__ */
|
|
35959
|
-
/* @__PURE__ */
|
|
35960
|
-
/* @__PURE__ */
|
|
36085
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36086
|
+
/* @__PURE__ */ jsx78(Text, { color: v.color, children: v.glyph }),
|
|
36087
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textPrimary, children: " " }),
|
|
36088
|
+
/* @__PURE__ */ jsx78(Text, { wrap: "truncate", children: name }),
|
|
36089
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36090
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: fmtShortDuration3(elapsed) })
|
|
35961
36091
|
] }, e.id);
|
|
35962
36092
|
})
|
|
35963
36093
|
] })
|
|
@@ -35994,7 +36124,7 @@ function WorktreePanelSidebar({
|
|
|
35994
36124
|
).length;
|
|
35995
36125
|
const merged = list.filter((w) => w.status === "merged").length;
|
|
35996
36126
|
const failed = list.filter((w) => w.status === "failed" || w.status === "needs-review").length;
|
|
35997
|
-
return /* @__PURE__ */
|
|
36127
|
+
return /* @__PURE__ */ jsx78(
|
|
35998
36128
|
SidebarPanelFrame,
|
|
35999
36129
|
{
|
|
36000
36130
|
accent: theme.monitor.worktree,
|
|
@@ -36002,26 +36132,26 @@ function WorktreePanelSidebar({
|
|
|
36002
36132
|
title: "WORKTREES",
|
|
36003
36133
|
width,
|
|
36004
36134
|
kicker: "isolation",
|
|
36005
|
-
right: /* @__PURE__ */
|
|
36006
|
-
/* @__PURE__ */
|
|
36135
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36136
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.warn, children: [
|
|
36007
36137
|
"A",
|
|
36008
36138
|
active
|
|
36009
36139
|
] }),
|
|
36010
|
-
/* @__PURE__ */
|
|
36011
|
-
/* @__PURE__ */
|
|
36140
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36141
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.success, children: [
|
|
36012
36142
|
"D",
|
|
36013
36143
|
merged
|
|
36014
36144
|
] }),
|
|
36015
|
-
failed > 0 ? /* @__PURE__ */
|
|
36016
|
-
/* @__PURE__ */
|
|
36017
|
-
/* @__PURE__ */
|
|
36145
|
+
failed > 0 ? /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36146
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36147
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.error, children: [
|
|
36018
36148
|
"!",
|
|
36019
36149
|
failed
|
|
36020
36150
|
] })
|
|
36021
36151
|
] }) : null
|
|
36022
36152
|
] }),
|
|
36023
36153
|
footer: "F4 details",
|
|
36024
|
-
children: /* @__PURE__ */
|
|
36154
|
+
children: /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: list.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no worktrees" }) : list.slice(0, 10).map((w) => {
|
|
36025
36155
|
const v = worktreeStatusVisual(w.status);
|
|
36026
36156
|
const diff = `+${w.insertions}/-${w.deletions}`;
|
|
36027
36157
|
const showDiff = inner >= 24;
|
|
@@ -36031,13 +36161,13 @@ function WorktreePanelSidebar({
|
|
|
36031
36161
|
w.branch.replace(/^wstack\/ap\//, ""),
|
|
36032
36162
|
Math.max(4, inner - rowChrome - diffWidth)
|
|
36033
36163
|
);
|
|
36034
|
-
return /* @__PURE__ */
|
|
36035
|
-
/* @__PURE__ */
|
|
36036
|
-
/* @__PURE__ */
|
|
36037
|
-
/* @__PURE__ */
|
|
36038
|
-
showDiff ? /* @__PURE__ */
|
|
36039
|
-
/* @__PURE__ */
|
|
36040
|
-
/* @__PURE__ */
|
|
36164
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36165
|
+
/* @__PURE__ */ jsx78(Text, { color: v.color, children: v.glyph }),
|
|
36166
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textPrimary, children: " " }),
|
|
36167
|
+
/* @__PURE__ */ jsx78(Text, { wrap: "truncate", children: branch }),
|
|
36168
|
+
showDiff ? /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36169
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36170
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: diff })
|
|
36041
36171
|
] }) : null
|
|
36042
36172
|
] }, w.branch);
|
|
36043
36173
|
}) })
|
|
@@ -36060,7 +36190,7 @@ function PlanPanelSidebar({
|
|
|
36060
36190
|
...items.filter((i) => i.status === "open").slice(0, 4),
|
|
36061
36191
|
...items.filter((i) => i.status === "done").slice(0, 2)
|
|
36062
36192
|
];
|
|
36063
|
-
return /* @__PURE__ */
|
|
36193
|
+
return /* @__PURE__ */ jsxs75(
|
|
36064
36194
|
SidebarPanelFrame,
|
|
36065
36195
|
{
|
|
36066
36196
|
accent: theme.accent,
|
|
@@ -36068,25 +36198,25 @@ function PlanPanelSidebar({
|
|
|
36068
36198
|
title: "PLAN",
|
|
36069
36199
|
width,
|
|
36070
36200
|
kicker: title ? trunc3(title, 20) : void 0,
|
|
36071
|
-
right: /* @__PURE__ */
|
|
36072
|
-
/* @__PURE__ */
|
|
36201
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36202
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.warn, children: [
|
|
36073
36203
|
"\u25D0",
|
|
36074
36204
|
inProgressCount
|
|
36075
36205
|
] }),
|
|
36076
|
-
/* @__PURE__ */
|
|
36077
|
-
/* @__PURE__ */
|
|
36206
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36207
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.success, children: [
|
|
36078
36208
|
glyphs.success,
|
|
36079
36209
|
doneCount
|
|
36080
36210
|
] }),
|
|
36081
|
-
/* @__PURE__ */
|
|
36211
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36082
36212
|
" ",
|
|
36083
36213
|
total
|
|
36084
36214
|
] })
|
|
36085
36215
|
] }),
|
|
36086
36216
|
footer: "F5 details",
|
|
36087
36217
|
children: [
|
|
36088
|
-
/* @__PURE__ */
|
|
36089
|
-
/* @__PURE__ */
|
|
36218
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
36219
|
+
/* @__PURE__ */ jsx78(
|
|
36090
36220
|
SidebarSectionHeader,
|
|
36091
36221
|
{
|
|
36092
36222
|
glyph: glyphs.plan,
|
|
@@ -36097,13 +36227,13 @@ function PlanPanelSidebar({
|
|
|
36097
36227
|
innerWidth: inner
|
|
36098
36228
|
}
|
|
36099
36229
|
),
|
|
36100
|
-
/* @__PURE__ */
|
|
36101
|
-
/* @__PURE__ */
|
|
36102
|
-
/* @__PURE__ */
|
|
36230
|
+
/* @__PURE__ */ jsxs75(Box, { children: [
|
|
36231
|
+
/* @__PURE__ */ jsx78(Text, { color: ratio === 1 && total > 0 ? theme.success : theme.accent, children: "\u2588".repeat(Math.round(ratio * inner)) }),
|
|
36232
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.borderSubtle, children: "\u2591".repeat(Math.max(0, inner - Math.round(ratio * inner))) })
|
|
36103
36233
|
] })
|
|
36104
36234
|
] }),
|
|
36105
|
-
/* @__PURE__ */
|
|
36106
|
-
/* @__PURE__ */
|
|
36235
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: [
|
|
36236
|
+
/* @__PURE__ */ jsx78(
|
|
36107
36237
|
SidebarSectionHeader,
|
|
36108
36238
|
{
|
|
36109
36239
|
glyph: glyphs.task,
|
|
@@ -36113,12 +36243,12 @@ function PlanPanelSidebar({
|
|
|
36113
36243
|
innerWidth: inner
|
|
36114
36244
|
}
|
|
36115
36245
|
),
|
|
36116
|
-
ordered.length === 0 ? /* @__PURE__ */
|
|
36246
|
+
ordered.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no plan items" }) : ordered.map((item) => {
|
|
36117
36247
|
const icon = item.status === "done" ? glyphs.success : item.status === "in_progress" ? "\u25D0" : "\u25CB";
|
|
36118
36248
|
const color = item.status === "done" ? theme.success : item.status === "in_progress" ? theme.warn : theme.textMuted;
|
|
36119
|
-
return /* @__PURE__ */
|
|
36120
|
-
/* @__PURE__ */
|
|
36121
|
-
/* @__PURE__ */
|
|
36249
|
+
return /* @__PURE__ */ jsxs75(Box, { width: inner, flexDirection: "row", children: [
|
|
36250
|
+
/* @__PURE__ */ jsx78(Text, { color, children: icon }),
|
|
36251
|
+
/* @__PURE__ */ jsxs75(
|
|
36122
36252
|
Text,
|
|
36123
36253
|
{
|
|
36124
36254
|
color: item.status === "done" ? theme.textMuted : theme.textPrimary,
|
|
@@ -36143,7 +36273,7 @@ function TodosPanelSidebar({ todos, width }) {
|
|
|
36143
36273
|
return rank(a) - rank(b);
|
|
36144
36274
|
}).slice(0, 12);
|
|
36145
36275
|
const done = todos.filter((t) => t.status === "completed").length;
|
|
36146
|
-
return /* @__PURE__ */
|
|
36276
|
+
return /* @__PURE__ */ jsx78(
|
|
36147
36277
|
SidebarPanelFrame,
|
|
36148
36278
|
{
|
|
36149
36279
|
accent: theme.accent,
|
|
@@ -36151,21 +36281,21 @@ function TodosPanelSidebar({ todos, width }) {
|
|
|
36151
36281
|
title: "TODOS",
|
|
36152
36282
|
width,
|
|
36153
36283
|
kicker: "mission queue",
|
|
36154
|
-
right: /* @__PURE__ */
|
|
36155
|
-
/* @__PURE__ */
|
|
36156
|
-
/* @__PURE__ */
|
|
36284
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36285
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.success, children: done }),
|
|
36286
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36157
36287
|
"/",
|
|
36158
36288
|
todos.length
|
|
36159
36289
|
] })
|
|
36160
36290
|
] }),
|
|
36161
36291
|
footer: "F6 details",
|
|
36162
|
-
children: /* @__PURE__ */
|
|
36292
|
+
children: /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: ordered.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no todos" }) : ordered.map((t) => {
|
|
36163
36293
|
const icon = t.status === "completed" ? glyphs.success : t.status === "in_progress" ? "\u25CF" : "\u25CB";
|
|
36164
36294
|
const color = t.status === "completed" ? theme.success : t.status === "in_progress" ? theme.accent : theme.textMuted;
|
|
36165
36295
|
const label = t.status === "in_progress" && t.activeForm ? t.activeForm : t.content;
|
|
36166
|
-
return /* @__PURE__ */
|
|
36167
|
-
/* @__PURE__ */
|
|
36168
|
-
/* @__PURE__ */
|
|
36296
|
+
return /* @__PURE__ */ jsxs75(Box, { width: inner, flexDirection: "row", children: [
|
|
36297
|
+
/* @__PURE__ */ jsx78(Text, { color, children: icon }),
|
|
36298
|
+
/* @__PURE__ */ jsxs75(
|
|
36169
36299
|
Text,
|
|
36170
36300
|
{
|
|
36171
36301
|
color: t.status === "completed" ? theme.textMuted : theme.textPrimary,
|
|
@@ -36183,7 +36313,7 @@ function TodosPanelSidebar({ todos, width }) {
|
|
|
36183
36313
|
}
|
|
36184
36314
|
function QueuePanelSidebar({ items, width }) {
|
|
36185
36315
|
const inner = Math.max(8, width);
|
|
36186
|
-
return /* @__PURE__ */
|
|
36316
|
+
return /* @__PURE__ */ jsx78(
|
|
36187
36317
|
SidebarPanelFrame,
|
|
36188
36318
|
{
|
|
36189
36319
|
accent: theme.accent,
|
|
@@ -36191,14 +36321,14 @@ function QueuePanelSidebar({ items, width }) {
|
|
|
36191
36321
|
title: "QUEUE",
|
|
36192
36322
|
width,
|
|
36193
36323
|
kicker: "queued prompts",
|
|
36194
|
-
right: /* @__PURE__ */
|
|
36324
|
+
right: /* @__PURE__ */ jsx78(Text, { color: items.length > 0 ? theme.warn : theme.textMuted, bold: true, children: items.length }),
|
|
36195
36325
|
footer: "F7 details",
|
|
36196
|
-
children: /* @__PURE__ */
|
|
36197
|
-
/* @__PURE__ */
|
|
36326
|
+
children: /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: items.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "queue is empty" }) : items.slice(0, 10).map((item, i) => /* @__PURE__ */ jsxs75(Box, { width: inner, flexDirection: "row", children: [
|
|
36327
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36198
36328
|
i + 1,
|
|
36199
36329
|
"."
|
|
36200
36330
|
] }),
|
|
36201
|
-
/* @__PURE__ */
|
|
36331
|
+
/* @__PURE__ */ jsxs75(
|
|
36202
36332
|
Text,
|
|
36203
36333
|
{
|
|
36204
36334
|
color: theme.textPrimary,
|
|
@@ -36219,7 +36349,7 @@ function ProcessListPanelSidebar({
|
|
|
36219
36349
|
width
|
|
36220
36350
|
}) {
|
|
36221
36351
|
const inner = Math.max(8, width);
|
|
36222
|
-
return /* @__PURE__ */
|
|
36352
|
+
return /* @__PURE__ */ jsx78(
|
|
36223
36353
|
SidebarPanelFrame,
|
|
36224
36354
|
{
|
|
36225
36355
|
accent: theme.monitor.fleet,
|
|
@@ -36227,20 +36357,20 @@ function ProcessListPanelSidebar({
|
|
|
36227
36357
|
title: "PROCESSES",
|
|
36228
36358
|
width,
|
|
36229
36359
|
kicker: "running",
|
|
36230
|
-
right: /* @__PURE__ */
|
|
36231
|
-
/* @__PURE__ */
|
|
36232
|
-
/* @__PURE__ */
|
|
36360
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36361
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.success, children: activeCount }),
|
|
36362
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36233
36363
|
"/",
|
|
36234
36364
|
totalCount
|
|
36235
36365
|
] })
|
|
36236
36366
|
] }),
|
|
36237
36367
|
footer: "F8 details",
|
|
36238
|
-
children: /* @__PURE__ */
|
|
36239
|
-
/* @__PURE__ */
|
|
36240
|
-
/* @__PURE__ */
|
|
36241
|
-
/* @__PURE__ */
|
|
36242
|
-
/* @__PURE__ */
|
|
36243
|
-
/* @__PURE__ */
|
|
36368
|
+
children: /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: processes.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no processes" }) : processes.slice(0, 10).map((p, i) => /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36369
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.success, children: glyphs.running }),
|
|
36370
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textPrimary, children: " " }),
|
|
36371
|
+
/* @__PURE__ */ jsx78(Text, { wrap: "truncate", children: trunc3(p.name, inner - 12) }),
|
|
36372
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36373
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: p.pid })
|
|
36244
36374
|
] }, `${p.pid}-${i}`)) })
|
|
36245
36375
|
}
|
|
36246
36376
|
);
|
|
@@ -36256,7 +36386,7 @@ function GoalPanelSidebar({
|
|
|
36256
36386
|
const progress = typeof goal?.progress === "number" ? goal.progress : 0;
|
|
36257
36387
|
const deliverables = goal?.deliverables ?? [];
|
|
36258
36388
|
const doneCount = deliverables.filter((d) => /^\[[x✓]\]|✅|\(done\)/i.test(d)).length;
|
|
36259
|
-
return /* @__PURE__ */
|
|
36389
|
+
return /* @__PURE__ */ jsx78(
|
|
36260
36390
|
SidebarPanelFrame,
|
|
36261
36391
|
{
|
|
36262
36392
|
accent: theme.brand,
|
|
@@ -36264,15 +36394,15 @@ function GoalPanelSidebar({
|
|
|
36264
36394
|
title: "GOAL",
|
|
36265
36395
|
width,
|
|
36266
36396
|
kicker: "mission control",
|
|
36267
|
-
right: goal ? /* @__PURE__ */
|
|
36397
|
+
right: goal ? /* @__PURE__ */ jsxs75(Text, { color: coordinatorRunning ? theme.success : theme.textMuted, bold: true, children: [
|
|
36268
36398
|
stateIcon,
|
|
36269
36399
|
" ",
|
|
36270
36400
|
goal.goalState.toUpperCase()
|
|
36271
36401
|
] }) : null,
|
|
36272
36402
|
footer: "F9 details",
|
|
36273
|
-
children: !goal ? /* @__PURE__ */
|
|
36274
|
-
/* @__PURE__ */
|
|
36275
|
-
/* @__PURE__ */
|
|
36403
|
+
children: !goal ? /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, children: /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no mission set" }) }) : /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36404
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
36405
|
+
/* @__PURE__ */ jsx78(
|
|
36276
36406
|
SidebarSectionHeader,
|
|
36277
36407
|
{
|
|
36278
36408
|
glyph: glyphs.goal,
|
|
@@ -36281,10 +36411,10 @@ function GoalPanelSidebar({
|
|
|
36281
36411
|
innerWidth: inner
|
|
36282
36412
|
}
|
|
36283
36413
|
),
|
|
36284
|
-
/* @__PURE__ */
|
|
36414
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textPrimary, bold: true, wrap: "truncate", children: trunc3(displayGoal, inner - 2) })
|
|
36285
36415
|
] }),
|
|
36286
|
-
/* @__PURE__ */
|
|
36287
|
-
/* @__PURE__ */
|
|
36416
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
36417
|
+
/* @__PURE__ */ jsx78(
|
|
36288
36418
|
SidebarSectionHeader,
|
|
36289
36419
|
{
|
|
36290
36420
|
glyph: glyphs.success,
|
|
@@ -36294,13 +36424,13 @@ function GoalPanelSidebar({
|
|
|
36294
36424
|
innerWidth: inner
|
|
36295
36425
|
}
|
|
36296
36426
|
),
|
|
36297
|
-
/* @__PURE__ */
|
|
36298
|
-
/* @__PURE__ */
|
|
36299
|
-
/* @__PURE__ */
|
|
36427
|
+
/* @__PURE__ */ jsxs75(Box, { children: [
|
|
36428
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.success, children: "\u2588".repeat(Math.round(progress / 100 * inner)) }),
|
|
36429
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.borderSubtle, children: "\u2591".repeat(Math.max(0, inner - Math.round(progress / 100 * inner))) })
|
|
36300
36430
|
] })
|
|
36301
36431
|
] }),
|
|
36302
|
-
/* @__PURE__ */
|
|
36303
|
-
/* @__PURE__ */
|
|
36432
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: [
|
|
36433
|
+
/* @__PURE__ */ jsx78(
|
|
36304
36434
|
SidebarSectionHeader,
|
|
36305
36435
|
{
|
|
36306
36436
|
glyph: glyphs.task,
|
|
@@ -36312,9 +36442,9 @@ function GoalPanelSidebar({
|
|
|
36312
36442
|
),
|
|
36313
36443
|
deliverables.slice(0, 6).map((d, i) => {
|
|
36314
36444
|
const done = /^\[[x✓]\]|✅|\(done\)/i.test(d);
|
|
36315
|
-
return /* @__PURE__ */
|
|
36316
|
-
/* @__PURE__ */
|
|
36317
|
-
/* @__PURE__ */
|
|
36445
|
+
return /* @__PURE__ */ jsxs75(Box, { width: inner, flexDirection: "row", children: [
|
|
36446
|
+
/* @__PURE__ */ jsx78(Text, { color: done ? theme.success : theme.textMuted, children: done ? glyphs.success : glyphs.pending }),
|
|
36447
|
+
/* @__PURE__ */ jsxs75(
|
|
36318
36448
|
Text,
|
|
36319
36449
|
{
|
|
36320
36450
|
color: done ? theme.textMuted : theme.textSecondary,
|
|
@@ -36342,7 +36472,7 @@ function SessionsPanelSidebar({
|
|
|
36342
36472
|
const live = liveSessions?.slice(0, 3) ?? [];
|
|
36343
36473
|
const resume = resumeSessions?.slice(0, 3) ?? [];
|
|
36344
36474
|
const total = (liveSessions?.length ?? 0) + (resumeSessions?.length ?? 0);
|
|
36345
|
-
return /* @__PURE__ */
|
|
36475
|
+
return /* @__PURE__ */ jsxs75(
|
|
36346
36476
|
SidebarPanelFrame,
|
|
36347
36477
|
{
|
|
36348
36478
|
accent: theme.success,
|
|
@@ -36350,11 +36480,11 @@ function SessionsPanelSidebar({
|
|
|
36350
36480
|
title: "SESSIONS",
|
|
36351
36481
|
width,
|
|
36352
36482
|
kicker: "live + resume",
|
|
36353
|
-
right: /* @__PURE__ */
|
|
36483
|
+
right: /* @__PURE__ */ jsx78(Text, { color: total > 0 ? theme.success : theme.textMuted, children: total }),
|
|
36354
36484
|
footer: "F10 details",
|
|
36355
36485
|
children: [
|
|
36356
|
-
live.length > 0 ? /* @__PURE__ */
|
|
36357
|
-
/* @__PURE__ */
|
|
36486
|
+
live.length > 0 ? /* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
36487
|
+
/* @__PURE__ */ jsx78(
|
|
36358
36488
|
SidebarSectionHeader,
|
|
36359
36489
|
{
|
|
36360
36490
|
glyph: glyphs.peers,
|
|
@@ -36371,22 +36501,22 @@ function SessionsPanelSidebar({
|
|
|
36371
36501
|
);
|
|
36372
36502
|
const icon = isCurrent ? "\u25CF" : liveSessionGlyph(s2.status);
|
|
36373
36503
|
const color = liveSessionColor2(s2.status);
|
|
36374
|
-
return /* @__PURE__ */
|
|
36375
|
-
/* @__PURE__ */
|
|
36376
|
-
/* @__PURE__ */
|
|
36504
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36505
|
+
/* @__PURE__ */ jsx78(Text, { color, children: icon }),
|
|
36506
|
+
/* @__PURE__ */ jsxs75(Text, { color: isCurrent ? theme.accent : theme.textPrimary, bold: isCurrent, children: [
|
|
36377
36507
|
" ",
|
|
36378
36508
|
trunc3(s2.projectName, inner - 6)
|
|
36379
36509
|
] }),
|
|
36380
|
-
/* @__PURE__ */
|
|
36381
|
-
/* @__PURE__ */
|
|
36510
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36511
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36382
36512
|
s2.agentCount,
|
|
36383
36513
|
"a"
|
|
36384
36514
|
] })
|
|
36385
36515
|
] }, s2.sessionId);
|
|
36386
36516
|
})
|
|
36387
36517
|
] }) : null,
|
|
36388
|
-
resume.length > 0 ? /* @__PURE__ */
|
|
36389
|
-
/* @__PURE__ */
|
|
36518
|
+
resume.length > 0 ? /* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: [
|
|
36519
|
+
/* @__PURE__ */ jsx78(
|
|
36390
36520
|
SidebarSectionHeader,
|
|
36391
36521
|
{
|
|
36392
36522
|
glyph: glyphs.save,
|
|
@@ -36406,9 +36536,9 @@ function SessionsPanelSidebar({
|
|
|
36406
36536
|
currentSessionId,
|
|
36407
36537
|
rs.isCurrent
|
|
36408
36538
|
);
|
|
36409
|
-
return /* @__PURE__ */
|
|
36410
|
-
/* @__PURE__ */
|
|
36411
|
-
/* @__PURE__ */
|
|
36539
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36540
|
+
/* @__PURE__ */ jsx78(Text, { color: outcomeColor, children: outcomeGlyph }),
|
|
36541
|
+
/* @__PURE__ */ jsxs75(
|
|
36412
36542
|
Text,
|
|
36413
36543
|
{
|
|
36414
36544
|
color: isCurrent ? theme.accent : theme.textSecondary,
|
|
@@ -36420,12 +36550,12 @@ function SessionsPanelSidebar({
|
|
|
36420
36550
|
]
|
|
36421
36551
|
}
|
|
36422
36552
|
),
|
|
36423
|
-
/* @__PURE__ */
|
|
36424
|
-
/* @__PURE__ */
|
|
36553
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36554
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: rel })
|
|
36425
36555
|
] }, rs.id);
|
|
36426
36556
|
})
|
|
36427
36557
|
] }) : null,
|
|
36428
|
-
total === 0 ? /* @__PURE__ */
|
|
36558
|
+
total === 0 ? /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no sessions" }) }) : null
|
|
36429
36559
|
]
|
|
36430
36560
|
}
|
|
36431
36561
|
);
|
|
@@ -36439,7 +36569,7 @@ function CoordinatorPanelSidebar({
|
|
|
36439
36569
|
width
|
|
36440
36570
|
}) {
|
|
36441
36571
|
const inner = Math.max(8, width);
|
|
36442
|
-
return /* @__PURE__ */
|
|
36572
|
+
return /* @__PURE__ */ jsxs75(
|
|
36443
36573
|
SidebarPanelFrame,
|
|
36444
36574
|
{
|
|
36445
36575
|
accent: theme.brand,
|
|
@@ -36447,11 +36577,11 @@ function CoordinatorPanelSidebar({
|
|
|
36447
36577
|
title: "COORDINATOR",
|
|
36448
36578
|
width,
|
|
36449
36579
|
kicker: "autonomous",
|
|
36450
|
-
right: /* @__PURE__ */
|
|
36580
|
+
right: /* @__PURE__ */ jsx78(Text, { color: running ? theme.success : theme.textMuted, bold: true, children: running ? "\u25CF RUNNING" : "\u25CB IDLE" }),
|
|
36451
36581
|
footer: "F11 details",
|
|
36452
36582
|
children: [
|
|
36453
|
-
/* @__PURE__ */
|
|
36454
|
-
/* @__PURE__ */
|
|
36583
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
36584
|
+
/* @__PURE__ */ jsx78(
|
|
36455
36585
|
SidebarSectionHeader,
|
|
36456
36586
|
{
|
|
36457
36587
|
glyph: glyphs.running,
|
|
@@ -36461,15 +36591,15 @@ function CoordinatorPanelSidebar({
|
|
|
36461
36591
|
innerWidth: inner
|
|
36462
36592
|
}
|
|
36463
36593
|
),
|
|
36464
|
-
phaseNames.length === 0 ? /* @__PURE__ */
|
|
36465
|
-
/* @__PURE__ */
|
|
36466
|
-
/* @__PURE__ */
|
|
36594
|
+
phaseNames.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no active phases" }) : phaseNames.slice(0, 5).map((name, i) => /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36595
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.accent, children: "\u25CF" }),
|
|
36596
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textPrimary, wrap: "truncate", children: [
|
|
36467
36597
|
" ",
|
|
36468
36598
|
trunc3(name, inner - 4)
|
|
36469
36599
|
] })
|
|
36470
36600
|
] }, i))
|
|
36471
36601
|
] }),
|
|
36472
|
-
/* @__PURE__ */
|
|
36602
|
+
/* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: /* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36473
36603
|
"elapsed ",
|
|
36474
36604
|
fmtShortDuration3(elapsedMs)
|
|
36475
36605
|
] }) })
|
|
@@ -36484,7 +36614,7 @@ function KanbanPanelSidebar({
|
|
|
36484
36614
|
width
|
|
36485
36615
|
}) {
|
|
36486
36616
|
const inner = Math.max(8, width);
|
|
36487
|
-
return /* @__PURE__ */
|
|
36617
|
+
return /* @__PURE__ */ jsxs75(
|
|
36488
36618
|
SidebarPanelFrame,
|
|
36489
36619
|
{
|
|
36490
36620
|
accent: theme.accent,
|
|
@@ -36492,20 +36622,20 @@ function KanbanPanelSidebar({
|
|
|
36492
36622
|
title: "KANBAN",
|
|
36493
36623
|
width,
|
|
36494
36624
|
kicker: "board",
|
|
36495
|
-
right: /* @__PURE__ */
|
|
36496
|
-
/* @__PURE__ */
|
|
36625
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36626
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.success, children: [
|
|
36497
36627
|
glyphs.success,
|
|
36498
36628
|
columns.find((c) => c.name === "done")?.count ?? 0
|
|
36499
36629
|
] }),
|
|
36500
|
-
/* @__PURE__ */
|
|
36630
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textMuted, children: [
|
|
36501
36631
|
" ",
|
|
36502
36632
|
totalActive
|
|
36503
36633
|
] })
|
|
36504
36634
|
] }),
|
|
36505
36635
|
footer: "F12 details",
|
|
36506
36636
|
children: [
|
|
36507
|
-
/* @__PURE__ */
|
|
36508
|
-
/* @__PURE__ */
|
|
36637
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, children: [
|
|
36638
|
+
/* @__PURE__ */ jsx78(
|
|
36509
36639
|
SidebarSectionHeader,
|
|
36510
36640
|
{
|
|
36511
36641
|
glyph: glyphs.fleet,
|
|
@@ -36514,14 +36644,14 @@ function KanbanPanelSidebar({
|
|
|
36514
36644
|
innerWidth: inner
|
|
36515
36645
|
}
|
|
36516
36646
|
),
|
|
36517
|
-
columns.slice(0, 5).map((c, i) => /* @__PURE__ */
|
|
36518
|
-
/* @__PURE__ */
|
|
36519
|
-
/* @__PURE__ */
|
|
36520
|
-
/* @__PURE__ */
|
|
36647
|
+
columns.slice(0, 5).map((c, i) => /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36648
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textSecondary, wrap: "truncate", children: trunc3(c.name, inner - 6) }),
|
|
36649
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36650
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: c.count })
|
|
36521
36651
|
] }, i))
|
|
36522
36652
|
] }),
|
|
36523
|
-
/* @__PURE__ */
|
|
36524
|
-
/* @__PURE__ */
|
|
36653
|
+
/* @__PURE__ */ jsxs75(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: [
|
|
36654
|
+
/* @__PURE__ */ jsx78(
|
|
36525
36655
|
SidebarSectionHeader,
|
|
36526
36656
|
{
|
|
36527
36657
|
glyph: glyphs.running,
|
|
@@ -36530,9 +36660,9 @@ function KanbanPanelSidebar({
|
|
|
36530
36660
|
innerWidth: inner
|
|
36531
36661
|
}
|
|
36532
36662
|
),
|
|
36533
|
-
activeCardTitles.length === 0 ? /* @__PURE__ */
|
|
36534
|
-
/* @__PURE__ */
|
|
36535
|
-
/* @__PURE__ */
|
|
36663
|
+
activeCardTitles.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no active cards" }) : activeCardTitles.slice(0, 6).map((title, i) => /* @__PURE__ */ jsxs75(Box, { width: inner, flexDirection: "row", children: [
|
|
36664
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.warn, children: "\u25CF" }),
|
|
36665
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textPrimary, children: [
|
|
36536
36666
|
" ",
|
|
36537
36667
|
title
|
|
36538
36668
|
] })
|
|
@@ -36550,7 +36680,7 @@ function ConnectionsPanelSidebar({
|
|
|
36550
36680
|
const okCount = connections.filter((c) => c.status === "ok").length;
|
|
36551
36681
|
const warnCount = connections.filter((c) => c.status === "warn").length;
|
|
36552
36682
|
const downCount = connections.filter((c) => c.status === "down").length;
|
|
36553
|
-
return /* @__PURE__ */
|
|
36683
|
+
return /* @__PURE__ */ jsx78(
|
|
36554
36684
|
SidebarPanelFrame,
|
|
36555
36685
|
{
|
|
36556
36686
|
accent: theme.accent,
|
|
@@ -36558,39 +36688,39 @@ function ConnectionsPanelSidebar({
|
|
|
36558
36688
|
title: "CONNECTIONS",
|
|
36559
36689
|
width,
|
|
36560
36690
|
kicker: "service health",
|
|
36561
|
-
right: /* @__PURE__ */
|
|
36562
|
-
/* @__PURE__ */
|
|
36691
|
+
right: /* @__PURE__ */ jsxs75(Text, { children: [
|
|
36692
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.success, children: [
|
|
36563
36693
|
glyphs.success,
|
|
36564
36694
|
okCount
|
|
36565
36695
|
] }),
|
|
36566
|
-
warnCount > 0 ? /* @__PURE__ */
|
|
36567
|
-
/* @__PURE__ */
|
|
36568
|
-
/* @__PURE__ */
|
|
36696
|
+
warnCount > 0 ? /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36697
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36698
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.warn, children: [
|
|
36569
36699
|
glyphs.warning,
|
|
36570
36700
|
warnCount
|
|
36571
36701
|
] })
|
|
36572
36702
|
] }) : null,
|
|
36573
|
-
downCount > 0 ? /* @__PURE__ */
|
|
36574
|
-
/* @__PURE__ */
|
|
36575
|
-
/* @__PURE__ */
|
|
36703
|
+
downCount > 0 ? /* @__PURE__ */ jsxs75(Fragment27, { children: [
|
|
36704
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: " " }),
|
|
36705
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.error, children: [
|
|
36576
36706
|
glyphs.failure,
|
|
36577
36707
|
downCount
|
|
36578
36708
|
] })
|
|
36579
36709
|
] }) : null
|
|
36580
36710
|
] }),
|
|
36581
36711
|
footer: "Ctrl+N details",
|
|
36582
|
-
children: /* @__PURE__ */
|
|
36712
|
+
children: /* @__PURE__ */ jsx78(SidebarPanelCard, { innerWidth: inner, marginBottom: 0, children: connections.length === 0 ? /* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: "no connections" }) : connections.slice(0, 10).map((c, i) => {
|
|
36583
36713
|
const icon = c.status === "ok" ? glyphs.success : c.status === "warn" ? glyphs.warning : c.status === "down" ? glyphs.failure : "?";
|
|
36584
36714
|
const color = c.status === "ok" ? theme.success : c.status === "warn" ? theme.warn : c.status === "down" ? theme.error : theme.textMuted;
|
|
36585
36715
|
const lat = c.latencyMs != null ? `${c.latencyMs}ms` : "";
|
|
36586
|
-
return /* @__PURE__ */
|
|
36587
|
-
/* @__PURE__ */
|
|
36588
|
-
/* @__PURE__ */
|
|
36716
|
+
return /* @__PURE__ */ jsxs75(Box, { flexDirection: "row", children: [
|
|
36717
|
+
/* @__PURE__ */ jsx78(Text, { color, children: icon }),
|
|
36718
|
+
/* @__PURE__ */ jsxs75(Text, { color: theme.textPrimary, wrap: "truncate", children: [
|
|
36589
36719
|
" ",
|
|
36590
36720
|
trunc3(c.name, inner - 10)
|
|
36591
36721
|
] }),
|
|
36592
|
-
/* @__PURE__ */
|
|
36593
|
-
/* @__PURE__ */
|
|
36722
|
+
/* @__PURE__ */ jsx78(Box, { flexGrow: 1 }),
|
|
36723
|
+
/* @__PURE__ */ jsx78(Text, { color: theme.textMuted, children: lat })
|
|
36594
36724
|
] }, `${c.name}-${i}`);
|
|
36595
36725
|
}) })
|
|
36596
36726
|
}
|
|
@@ -36599,10 +36729,10 @@ function ConnectionsPanelSidebar({
|
|
|
36599
36729
|
|
|
36600
36730
|
// src/hooks/use-sidebar-panel-data.ts
|
|
36601
36731
|
import { getProcessRegistry as getProcessRegistry9 } from "@wrongstack/tools";
|
|
36602
|
-
import { useEffect as
|
|
36732
|
+
import { useEffect as useEffect70, useState as useState43 } from "react";
|
|
36603
36733
|
function useSidebarProcessList(enabled = true) {
|
|
36604
|
-
const [data, setData] =
|
|
36605
|
-
|
|
36734
|
+
const [data, setData] = useState43({ activeCount: 0, totalCount: 0, processes: [] });
|
|
36735
|
+
useEffect70(() => {
|
|
36606
36736
|
if (!enabled) return;
|
|
36607
36737
|
const read = () => {
|
|
36608
36738
|
const registry = getProcessRegistry9();
|
|
@@ -36622,8 +36752,8 @@ function useSidebarProcessList(enabled = true) {
|
|
|
36622
36752
|
return data;
|
|
36623
36753
|
}
|
|
36624
36754
|
function useSidebarConnections(projectRoot, enabled = true) {
|
|
36625
|
-
const [connections, setConnections] =
|
|
36626
|
-
|
|
36755
|
+
const [connections, setConnections] = useState43([]);
|
|
36756
|
+
useEffect70(() => {
|
|
36627
36757
|
if (!enabled) return;
|
|
36628
36758
|
let cancelled = false;
|
|
36629
36759
|
const poll = async () => {
|
|
@@ -36651,8 +36781,8 @@ function useSidebarConnections(projectRoot, enabled = true) {
|
|
|
36651
36781
|
return connections;
|
|
36652
36782
|
}
|
|
36653
36783
|
function useSidebarKanban(projectRoot, enabled = true) {
|
|
36654
|
-
const [data, setData] =
|
|
36655
|
-
|
|
36784
|
+
const [data, setData] = useState43({ columns: [], totalActive: 0, activeCardTitles: [] });
|
|
36785
|
+
useEffect70(() => {
|
|
36656
36786
|
if (!enabled) return;
|
|
36657
36787
|
let cancelled = false;
|
|
36658
36788
|
const poll = async () => {
|
|
@@ -36698,39 +36828,39 @@ function useSidebarKanban(projectRoot, enabled = true) {
|
|
|
36698
36828
|
}
|
|
36699
36829
|
|
|
36700
36830
|
// src/components/shadow-panel.tsx
|
|
36701
|
-
import { jsx as
|
|
36831
|
+
import { jsx as jsx79, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
36702
36832
|
function ShadowPanel({
|
|
36703
36833
|
shadow,
|
|
36704
36834
|
hint
|
|
36705
36835
|
}) {
|
|
36706
|
-
return /* @__PURE__ */
|
|
36707
|
-
/* @__PURE__ */
|
|
36708
|
-
/* @__PURE__ */
|
|
36709
|
-
/* @__PURE__ */
|
|
36710
|
-
/* @__PURE__ */
|
|
36711
|
-
/* @__PURE__ */
|
|
36712
|
-
shadow.running ? /* @__PURE__ */
|
|
36713
|
-
shadow.activeId ? /* @__PURE__ */
|
|
36836
|
+
return /* @__PURE__ */ jsxs76(Box, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 1, children: [
|
|
36837
|
+
/* @__PURE__ */ jsx79(Text, { bold: true, color: "blue", children: "\u2501\u2501 Shadow Agent \u2501\u2501" }),
|
|
36838
|
+
/* @__PURE__ */ jsx79(Text, { dimColor: true, children: "s start \xB7 t stop \xB7 i cycle interval \xB7 m cycle model \xB7 Esc close" }),
|
|
36839
|
+
/* @__PURE__ */ jsxs76(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
36840
|
+
/* @__PURE__ */ jsxs76(Box, { children: [
|
|
36841
|
+
/* @__PURE__ */ jsx79(Text, { bold: true, children: "Status: " }),
|
|
36842
|
+
shadow.running ? /* @__PURE__ */ jsx79(Text, { color: "green", children: "\u25CF running" }) : /* @__PURE__ */ jsx79(Text, { color: "gray", children: "\u25CB stopped" }),
|
|
36843
|
+
shadow.activeId ? /* @__PURE__ */ jsx79(Text, { dimColor: true, children: ` ${shadow.activeId.slice(0, 12)}\u2026` }) : null
|
|
36714
36844
|
] }),
|
|
36715
|
-
/* @__PURE__ */
|
|
36716
|
-
/* @__PURE__ */
|
|
36717
|
-
/* @__PURE__ */
|
|
36845
|
+
/* @__PURE__ */ jsxs76(Box, { marginTop: 1, children: [
|
|
36846
|
+
/* @__PURE__ */ jsx79(Text, { bold: true, children: "Model: " }),
|
|
36847
|
+
/* @__PURE__ */ jsx79(Text, { color: "cyan", children: shadow.model })
|
|
36718
36848
|
] }),
|
|
36719
|
-
/* @__PURE__ */
|
|
36720
|
-
/* @__PURE__ */
|
|
36721
|
-
/* @__PURE__ */
|
|
36722
|
-
/* @__PURE__ */
|
|
36849
|
+
/* @__PURE__ */ jsxs76(Box, { marginTop: 1, children: [
|
|
36850
|
+
/* @__PURE__ */ jsx79(Text, { bold: true, children: "Interval: " }),
|
|
36851
|
+
/* @__PURE__ */ jsx79(Text, { color: "yellow", children: shadow.intervalMs >= 1e3 ? `${shadow.intervalMs / 1e3}s` : `${shadow.intervalMs}ms` }),
|
|
36852
|
+
/* @__PURE__ */ jsx79(Text, { dimColor: true, children: " (min 5s)" })
|
|
36723
36853
|
] }),
|
|
36724
|
-
/* @__PURE__ */
|
|
36854
|
+
/* @__PURE__ */ jsx79(Box, { marginTop: 1, children: /* @__PURE__ */ jsx79(Text, { dimColor: true, children: shadow.running ? "Press t to stop the Shadow Agent" : "Press s to start the Shadow Agent" }) })
|
|
36725
36855
|
] }),
|
|
36726
|
-
hint ? /* @__PURE__ */
|
|
36856
|
+
hint ? /* @__PURE__ */ jsx79(Box, { marginTop: 1, children: /* @__PURE__ */ jsx79(Text, { dimColor: true, children: hint }) }) : null
|
|
36727
36857
|
] });
|
|
36728
36858
|
}
|
|
36729
36859
|
|
|
36730
36860
|
// src/components/shell-command-warning.tsx
|
|
36731
36861
|
import { writeOut as writeOut3 } from "@wrongstack/core/utils";
|
|
36732
36862
|
import React9 from "react";
|
|
36733
|
-
import { jsx as
|
|
36863
|
+
import { jsx as jsx80, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
36734
36864
|
function truncateShellCommandWarningCommand(text, max = 80) {
|
|
36735
36865
|
return text.length <= max ? text : `${text.slice(0, max - 1)}\u2026`;
|
|
36736
36866
|
}
|
|
@@ -36748,30 +36878,30 @@ function ShellCommandWarning({
|
|
|
36748
36878
|
if (ch === "n") onDecision("no");
|
|
36749
36879
|
if (ch === "d") onDecision("dont-show-again");
|
|
36750
36880
|
});
|
|
36751
|
-
return /* @__PURE__ */
|
|
36752
|
-
/* @__PURE__ */
|
|
36753
|
-
/* @__PURE__ */
|
|
36754
|
-
/* @__PURE__ */
|
|
36755
|
-
/* @__PURE__ */
|
|
36881
|
+
return /* @__PURE__ */ jsxs77(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
|
|
36882
|
+
/* @__PURE__ */ jsxs77(Box, { flexDirection: "row", children: [
|
|
36883
|
+
/* @__PURE__ */ jsx80(Text, { bold: true, color: "yellow", children: "\u26A0 SHELL COMMAND" }),
|
|
36884
|
+
/* @__PURE__ */ jsx80(Text, { children: " " }),
|
|
36885
|
+
/* @__PURE__ */ jsxs77(Text, { bold: true, color: "white", children: [
|
|
36756
36886
|
"!",
|
|
36757
36887
|
truncateShellCommandWarningCommand(command)
|
|
36758
36888
|
] })
|
|
36759
36889
|
] }),
|
|
36760
|
-
/* @__PURE__ */
|
|
36761
|
-
/* @__PURE__ */
|
|
36762
|
-
/* @__PURE__ */
|
|
36763
|
-
/* @__PURE__ */
|
|
36764
|
-
/* @__PURE__ */
|
|
36765
|
-
/* @__PURE__ */
|
|
36766
|
-
/* @__PURE__ */
|
|
36767
|
-
/* @__PURE__ */
|
|
36768
|
-
/* @__PURE__ */
|
|
36890
|
+
/* @__PURE__ */ jsx80(Text, { dimColor: true, children: "This will execute in your shell via /dev. Only run commands you trust." }),
|
|
36891
|
+
/* @__PURE__ */ jsx80(Text, { dimColor: true, children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }),
|
|
36892
|
+
/* @__PURE__ */ jsx80(Box, { flexDirection: "row", children: /* @__PURE__ */ jsxs77(Text, { children: [
|
|
36893
|
+
/* @__PURE__ */ jsx80(Text, { bold: true, color: "green", children: "[y]" }),
|
|
36894
|
+
/* @__PURE__ */ jsx80(Text, { dimColor: true, children: "es " }),
|
|
36895
|
+
/* @__PURE__ */ jsx80(Text, { bold: true, color: "red", children: "[n]" }),
|
|
36896
|
+
/* @__PURE__ */ jsx80(Text, { dimColor: true, children: "o " }),
|
|
36897
|
+
/* @__PURE__ */ jsx80(Text, { bold: true, color: "cyan", children: "[d]" }),
|
|
36898
|
+
/* @__PURE__ */ jsx80(Text, { dimColor: true, children: "ont show again" })
|
|
36769
36899
|
] }) })
|
|
36770
36900
|
] });
|
|
36771
36901
|
}
|
|
36772
36902
|
|
|
36773
36903
|
// src/components/slash-confirm-panel.tsx
|
|
36774
|
-
import { jsx as
|
|
36904
|
+
import { jsx as jsx81, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
36775
36905
|
function slashConfirmationDecision(input, key, defaultYes) {
|
|
36776
36906
|
if (key.escape) return "cancel";
|
|
36777
36907
|
if (key.return) return defaultYes;
|
|
@@ -36785,28 +36915,28 @@ function SlashConfirmPanel({
|
|
|
36785
36915
|
question,
|
|
36786
36916
|
defaultYes
|
|
36787
36917
|
}) {
|
|
36788
|
-
return /* @__PURE__ */
|
|
36789
|
-
/* @__PURE__ */
|
|
36790
|
-
/* @__PURE__ */
|
|
36791
|
-
/* @__PURE__ */
|
|
36792
|
-
/* @__PURE__ */
|
|
36918
|
+
return /* @__PURE__ */ jsxs78(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, marginY: 1, children: [
|
|
36919
|
+
/* @__PURE__ */ jsx81(Text, { bold: true, color: "yellow", children: "? CONFIRM ACTION" }),
|
|
36920
|
+
/* @__PURE__ */ jsx81(Box, { marginTop: 1, children: /* @__PURE__ */ jsx81(Text, { children: question }) }),
|
|
36921
|
+
/* @__PURE__ */ jsx81(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs78(Text, { children: [
|
|
36922
|
+
/* @__PURE__ */ jsx81(Text, { bold: true, color: "green", children: "[y]" }),
|
|
36793
36923
|
"es",
|
|
36794
36924
|
" ",
|
|
36795
|
-
/* @__PURE__ */
|
|
36925
|
+
/* @__PURE__ */ jsx81(Text, { bold: true, color: "red", children: "[n]" }),
|
|
36796
36926
|
"o",
|
|
36797
36927
|
" ",
|
|
36798
|
-
/* @__PURE__ */
|
|
36928
|
+
/* @__PURE__ */ jsx81(Text, { bold: true, children: "Enter" }),
|
|
36799
36929
|
" = ",
|
|
36800
36930
|
defaultYes ? "yes" : "no",
|
|
36801
36931
|
" ",
|
|
36802
|
-
/* @__PURE__ */
|
|
36932
|
+
/* @__PURE__ */ jsx81(Text, { bold: true, children: "Esc/q" }),
|
|
36803
36933
|
" = cancel"
|
|
36804
36934
|
] }) })
|
|
36805
36935
|
] });
|
|
36806
36936
|
}
|
|
36807
36937
|
|
|
36808
36938
|
// src/components/slash-menu.tsx
|
|
36809
|
-
import { jsx as
|
|
36939
|
+
import { jsx as jsx82, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
36810
36940
|
var MAX_VISIBLE_ITEMS = 8;
|
|
36811
36941
|
function SlashMenu({ query, matches, selected }) {
|
|
36812
36942
|
const placeholder2 = query ? `/${query}` : "/";
|
|
@@ -36825,59 +36955,59 @@ function SlashMenu({ query, matches, selected }) {
|
|
|
36825
36955
|
const visible = windowRows2(rows, selectedRowIdx < 0 ? 0 : selectedRowIdx, MAX_VISIBLE_ITEMS);
|
|
36826
36956
|
const hiddenAbove = visible.start;
|
|
36827
36957
|
const hiddenBelow = rows.length - visible.end;
|
|
36828
|
-
return /* @__PURE__ */
|
|
36829
|
-
/* @__PURE__ */
|
|
36958
|
+
return /* @__PURE__ */ jsxs79(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
|
|
36959
|
+
/* @__PURE__ */ jsxs79(Text, { bold: true, color: "cyan", children: [
|
|
36830
36960
|
"\u2501\u2501 Command palette \u2501\u2501 ",
|
|
36831
|
-
/* @__PURE__ */
|
|
36961
|
+
/* @__PURE__ */ jsx82(Text, { dimColor: true, children: placeholder2 }),
|
|
36832
36962
|
" ",
|
|
36833
|
-
/* @__PURE__ */
|
|
36963
|
+
/* @__PURE__ */ jsxs79(Text, { dimColor: true, children: [
|
|
36834
36964
|
"(",
|
|
36835
36965
|
resultMeta,
|
|
36836
36966
|
")"
|
|
36837
36967
|
] })
|
|
36838
36968
|
] }),
|
|
36839
|
-
/* @__PURE__ */
|
|
36840
|
-
hiddenAbove > 0 && /* @__PURE__ */
|
|
36969
|
+
/* @__PURE__ */ jsx82(Text, { dimColor: true, children: "Type to filter commands by name, alias, or description." }),
|
|
36970
|
+
hiddenAbove > 0 && /* @__PURE__ */ jsxs79(Text, { dimColor: true, children: [
|
|
36841
36971
|
" \u2191 ",
|
|
36842
36972
|
hiddenAbove,
|
|
36843
36973
|
" more"
|
|
36844
36974
|
] }),
|
|
36845
|
-
visible.contextHeader && /* @__PURE__ */
|
|
36975
|
+
visible.contextHeader && /* @__PURE__ */ jsxs79(Text, { bold: true, color: "yellow", dimColor: true, children: [
|
|
36846
36976
|
" ",
|
|
36847
36977
|
visible.contextHeader
|
|
36848
36978
|
] }),
|
|
36849
36979
|
visible.rows.map((row) => {
|
|
36850
36980
|
if (row.type === "header") {
|
|
36851
|
-
return /* @__PURE__ */
|
|
36981
|
+
return /* @__PURE__ */ jsxs79(Text, { bold: true, color: "yellow", dimColor: true, children: [
|
|
36852
36982
|
" ",
|
|
36853
36983
|
row.category
|
|
36854
36984
|
] }, `cat-${row.category}`);
|
|
36855
36985
|
}
|
|
36856
36986
|
const { match: m, index: i } = row;
|
|
36857
|
-
return /* @__PURE__ */
|
|
36987
|
+
return /* @__PURE__ */ jsxs79(Text, { inverse: i === selected, ...i === selected ? { color: "cyan" } : {}, children: [
|
|
36858
36988
|
i === selected ? "\u203A " : " ",
|
|
36859
|
-
/* @__PURE__ */
|
|
36860
|
-
m.argsHint ? /* @__PURE__ */
|
|
36989
|
+
/* @__PURE__ */ jsx82(Text, { bold: true, children: m.name }),
|
|
36990
|
+
m.argsHint ? /* @__PURE__ */ jsxs79(Text, { dimColor: true, children: [
|
|
36861
36991
|
" ",
|
|
36862
36992
|
m.argsHint
|
|
36863
36993
|
] }) : null,
|
|
36864
|
-
m.matchedAlias ? /* @__PURE__ */
|
|
36994
|
+
m.matchedAlias ? /* @__PURE__ */ jsxs79(Text, { dimColor: true, children: [
|
|
36865
36995
|
" alias /",
|
|
36866
36996
|
m.matchedAlias
|
|
36867
36997
|
] }) : null,
|
|
36868
|
-
/* @__PURE__ */
|
|
36998
|
+
/* @__PURE__ */ jsxs79(Text, { dimColor: true, children: [
|
|
36869
36999
|
" \u2014 ",
|
|
36870
37000
|
m.description
|
|
36871
37001
|
] })
|
|
36872
37002
|
] }, m.name);
|
|
36873
37003
|
}),
|
|
36874
|
-
hiddenBelow > 0 && /* @__PURE__ */
|
|
37004
|
+
hiddenBelow > 0 && /* @__PURE__ */ jsxs79(Text, { dimColor: true, children: [
|
|
36875
37005
|
" \u2193 ",
|
|
36876
37006
|
hiddenBelow,
|
|
36877
37007
|
" more"
|
|
36878
37008
|
] }),
|
|
36879
|
-
matches.length === 0 && /* @__PURE__ */
|
|
36880
|
-
/* @__PURE__ */
|
|
37009
|
+
matches.length === 0 && /* @__PURE__ */ jsx82(Text, { dimColor: true, children: "No matching commands" }),
|
|
37010
|
+
/* @__PURE__ */ jsx82(Text, { dimColor: true, children: "\u2500\u2500\u2500 \u2191\u2193 nav \xB7 Enter run \xB7 Tab fill \xB7 Esc close" })
|
|
36881
37011
|
] });
|
|
36882
37012
|
}
|
|
36883
37013
|
function windowRows2(rows, focus, max) {
|
|
@@ -36908,17 +37038,17 @@ function windowRows2(rows, focus, max) {
|
|
|
36908
37038
|
}
|
|
36909
37039
|
|
|
36910
37040
|
// src/components/tools-picker.tsx
|
|
36911
|
-
import { Fragment as Fragment28, jsx as
|
|
37041
|
+
import { Fragment as Fragment28, jsx as jsx83, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
36912
37042
|
var CHROME_ROWS6 = 15;
|
|
36913
37043
|
var MAX_PICKER_ITEMS2 = 15;
|
|
36914
37044
|
function toolActionLabel(enabled) {
|
|
36915
37045
|
return enabled ? "Enter makes this tool passive" : "Enter re-enables this tool";
|
|
36916
37046
|
}
|
|
36917
37047
|
function statusBadge2(enabled) {
|
|
36918
|
-
return enabled ? /* @__PURE__ */
|
|
37048
|
+
return enabled ? /* @__PURE__ */ jsx83(Text, { color: "green", children: "\u25CF active" }) : /* @__PURE__ */ jsx83(Text, { color: "red", children: "\u25CB passive" });
|
|
36919
37049
|
}
|
|
36920
37050
|
function rwBadge(mutating) {
|
|
36921
|
-
return mutating ? /* @__PURE__ */
|
|
37051
|
+
return mutating ? /* @__PURE__ */ jsx83(Text, { color: "yellow", children: "mut" }) : /* @__PURE__ */ jsx83(Text, { color: "cyan", children: "ro" });
|
|
36922
37052
|
}
|
|
36923
37053
|
function displayCategory(cat) {
|
|
36924
37054
|
if (!cat || cat.trim() === "") return "Other";
|
|
@@ -37017,19 +37147,19 @@ function ToolsPicker({
|
|
|
37017
37147
|
const hiddenAbove = win.start;
|
|
37018
37148
|
const hiddenBelow = rows.length - win.end;
|
|
37019
37149
|
const hasFilter = filterActive;
|
|
37020
|
-
return /* @__PURE__ */
|
|
37021
|
-
/* @__PURE__ */
|
|
37022
|
-
/* @__PURE__ */
|
|
37023
|
-
/* @__PURE__ */
|
|
37024
|
-
/* @__PURE__ */
|
|
37150
|
+
return /* @__PURE__ */ jsxs80(Box, { flexDirection: "column", borderStyle: "round", borderColor: "green", paddingX: 1, children: [
|
|
37151
|
+
/* @__PURE__ */ jsx83(Text, { bold: true, color: "green", children: "\u2501\u2501 Tools \u2501\u2501" }),
|
|
37152
|
+
/* @__PURE__ */ jsx83(Text, { dimColor: true, children: hasFilter ? `Filter: ${filter} (${visibleItems.length} match${visibleItems.length === 1 ? "" : "es"}) \xB7 Backspace edit \xB7 Esc clear` : `\u2191/\u2193 select \xB7 type to filter \xB7 Enter toggles \xB7 Esc close \xB7 ${enabledCount} active / ${passiveCount} passive` }),
|
|
37153
|
+
/* @__PURE__ */ jsx83(Text, { dimColor: true, children: "Passive tools stay listed for this session so you can select them and re-enable them later." }),
|
|
37154
|
+
/* @__PURE__ */ jsx83(Box, { marginTop: 1, flexDirection: "column", children: total === 0 ? /* @__PURE__ */ jsx83(Text, { dimColor: true, children: busy ? "Loading tools\u2026" : "No tools registered." }) : visibleItems.length === 0 ? /* @__PURE__ */ jsxs80(Text, { dimColor: true, children: [
|
|
37025
37155
|
'No tools match "',
|
|
37026
37156
|
filter,
|
|
37027
37157
|
'".'
|
|
37028
|
-
] }) : /* @__PURE__ */
|
|
37029
|
-
hiddenAbove > 0 ? /* @__PURE__ */
|
|
37158
|
+
] }) : /* @__PURE__ */ jsxs80(Fragment28, { children: [
|
|
37159
|
+
hiddenAbove > 0 ? /* @__PURE__ */ jsx83(Text, { dimColor: true, children: ` \u2191 ${hiddenAbove} more` }) : null,
|
|
37030
37160
|
displayRows.map(({ item, index }) => {
|
|
37031
37161
|
const focused = index === visibleSelected;
|
|
37032
|
-
return /* @__PURE__ */
|
|
37162
|
+
return /* @__PURE__ */ jsxs80(
|
|
37033
37163
|
Text,
|
|
37034
37164
|
{
|
|
37035
37165
|
inverse: focused,
|
|
@@ -37039,9 +37169,9 @@ function ToolsPicker({
|
|
|
37039
37169
|
focused ? "\u203A " : " ",
|
|
37040
37170
|
statusBadge2(item.enabled),
|
|
37041
37171
|
" ",
|
|
37042
|
-
/* @__PURE__ */
|
|
37172
|
+
/* @__PURE__ */ jsx83(Text, { bold: true, children: fitCell(item.name, columnWidths.name) }),
|
|
37043
37173
|
" ",
|
|
37044
|
-
/* @__PURE__ */
|
|
37174
|
+
/* @__PURE__ */ jsxs80(Text, { dimColor: true, children: [
|
|
37045
37175
|
fitCell(displayCategory(item.category), columnWidths.category),
|
|
37046
37176
|
" ",
|
|
37047
37177
|
fitCell(`[${item.owner}]`, columnWidths.owner),
|
|
@@ -37051,7 +37181,7 @@ function ToolsPicker({
|
|
|
37051
37181
|
" ",
|
|
37052
37182
|
fitCell(item.permission, columnWidths.permission),
|
|
37053
37183
|
" ",
|
|
37054
|
-
/* @__PURE__ */
|
|
37184
|
+
/* @__PURE__ */ jsxs80(Text, { color: item.descMode === "simple" ? "yellow" : void 0, children: [
|
|
37055
37185
|
"desc:",
|
|
37056
37186
|
item.descMode
|
|
37057
37187
|
] })
|
|
@@ -37061,21 +37191,21 @@ function ToolsPicker({
|
|
|
37061
37191
|
item.name
|
|
37062
37192
|
);
|
|
37063
37193
|
}),
|
|
37064
|
-
hiddenBelow > 0 ? /* @__PURE__ */
|
|
37194
|
+
hiddenBelow > 0 ? /* @__PURE__ */ jsx83(Text, { dimColor: true, children: ` \u2193 ${hiddenBelow} more` }) : null
|
|
37065
37195
|
] }) }),
|
|
37066
|
-
selectedItem ? /* @__PURE__ */
|
|
37067
|
-
/* @__PURE__ */
|
|
37068
|
-
/* @__PURE__ */
|
|
37069
|
-
/* @__PURE__ */
|
|
37196
|
+
selectedItem ? /* @__PURE__ */ jsxs80(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
37197
|
+
/* @__PURE__ */ jsxs80(Text, { children: [
|
|
37198
|
+
/* @__PURE__ */ jsx83(Text, { color: selectedItem.enabled ? "green" : "red", children: toolActionLabel(selectedItem.enabled) }),
|
|
37199
|
+
/* @__PURE__ */ jsx83(Text, { dimColor: true, children: ` \xB7 ${selectedItem.mutating ? "Mutating" : "Read-only"} \xB7 permission: ${selectedItem.permission} \xB7 descriptions: ${selectedItem.descMode}` })
|
|
37070
37200
|
] }),
|
|
37071
|
-
/* @__PURE__ */
|
|
37201
|
+
/* @__PURE__ */ jsx83(Text, { dimColor: true, wrap: "truncate-end", children: selectedItem.description || "No description provided." })
|
|
37072
37202
|
] }) : null,
|
|
37073
|
-
hint ? /* @__PURE__ */
|
|
37203
|
+
hint ? /* @__PURE__ */ jsx83(Box, { marginTop: 1, children: /* @__PURE__ */ jsx83(Text, { dimColor: true, children: hint }) }) : null
|
|
37074
37204
|
] });
|
|
37075
37205
|
}
|
|
37076
37206
|
|
|
37077
37207
|
// src/app-view.tsx
|
|
37078
|
-
import { jsx as
|
|
37208
|
+
import { jsx as jsx84, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
37079
37209
|
var CONTINUE_CONFIRM_DELAY_MS = 4e3;
|
|
37080
37210
|
var INPUT_PROMPT = DEFAULT_INPUT_PROMPT;
|
|
37081
37211
|
function AppView({ host, runtime }) {
|
|
@@ -37186,16 +37316,16 @@ function AppView({ host, runtime }) {
|
|
|
37186
37316
|
the history box (Ink-7: flex-end clips top), so a freshly-opened picker
|
|
37187
37317
|
or grown input is fully visible immediately while history briefly loses
|
|
37188
37318
|
its top rows until the viewport re-measures. */
|
|
37189
|
-
/* @__PURE__ */
|
|
37319
|
+
/* @__PURE__ */ jsx84(
|
|
37190
37320
|
Box,
|
|
37191
37321
|
{
|
|
37192
37322
|
flexDirection: "column",
|
|
37193
37323
|
height: runtime.termRows,
|
|
37194
37324
|
overflowY: "hidden",
|
|
37195
37325
|
justifyContent: "flex-end",
|
|
37196
|
-
children: /* @__PURE__ */
|
|
37197
|
-
/* @__PURE__ */
|
|
37198
|
-
/* @__PURE__ */
|
|
37326
|
+
children: /* @__PURE__ */ jsxs81(Box, { flexDirection: "row", width: termCols, flexShrink: 0, overflowX: "hidden", children: [
|
|
37327
|
+
/* @__PURE__ */ jsxs81(Box, { flexDirection: "column", flexShrink: 0, width: mainColumnWidth, overflowX: "hidden", children: [
|
|
37328
|
+
/* @__PURE__ */ jsx84(
|
|
37199
37329
|
ScrollableHistory,
|
|
37200
37330
|
{
|
|
37201
37331
|
entries: state.entries,
|
|
@@ -37216,8 +37346,8 @@ function AppView({ host, runtime }) {
|
|
|
37216
37346
|
},
|
|
37217
37347
|
`history-gen-${state.historyGen}`
|
|
37218
37348
|
),
|
|
37219
|
-
/* @__PURE__ */
|
|
37220
|
-
/* @__PURE__ */
|
|
37349
|
+
/* @__PURE__ */ jsxs81(Box, { flexDirection: "column", flexShrink: 0, ref: bottomRegionRef, width: mainColumnWidth, children: [
|
|
37350
|
+
/* @__PURE__ */ jsx84(
|
|
37221
37351
|
Input,
|
|
37222
37352
|
{
|
|
37223
37353
|
prompt: INPUT_PROMPT,
|
|
@@ -37235,7 +37365,7 @@ function AppView({ host, runtime }) {
|
|
|
37235
37365
|
workingTime: workingTimeMs
|
|
37236
37366
|
}
|
|
37237
37367
|
),
|
|
37238
|
-
state.picker.open ? /* @__PURE__ */
|
|
37368
|
+
state.picker.open ? /* @__PURE__ */ jsx84(
|
|
37239
37369
|
FilePicker,
|
|
37240
37370
|
{
|
|
37241
37371
|
query: state.picker.query,
|
|
@@ -37243,7 +37373,7 @@ function AppView({ host, runtime }) {
|
|
|
37243
37373
|
selected: state.picker.selected
|
|
37244
37374
|
}
|
|
37245
37375
|
) : null,
|
|
37246
|
-
state.slashPicker.open ? /* @__PURE__ */
|
|
37376
|
+
state.slashPicker.open ? /* @__PURE__ */ jsx84(
|
|
37247
37377
|
SlashMenu,
|
|
37248
37378
|
{
|
|
37249
37379
|
query: state.slashPicker.query,
|
|
@@ -37251,7 +37381,7 @@ function AppView({ host, runtime }) {
|
|
|
37251
37381
|
selected: state.slashPicker.selected
|
|
37252
37382
|
}
|
|
37253
37383
|
) : null,
|
|
37254
|
-
state.modelPicker.open ? /* @__PURE__ */
|
|
37384
|
+
state.modelPicker.open ? /* @__PURE__ */ jsx84(
|
|
37255
37385
|
ModelPicker,
|
|
37256
37386
|
{
|
|
37257
37387
|
step: state.modelPicker.step,
|
|
@@ -37265,7 +37395,7 @@ function AppView({ host, runtime }) {
|
|
|
37265
37395
|
titleLabel: state.modelPicker.title
|
|
37266
37396
|
}
|
|
37267
37397
|
) : null,
|
|
37268
|
-
state.autonomyPicker.open ? /* @__PURE__ */
|
|
37398
|
+
state.autonomyPicker.open ? /* @__PURE__ */ jsx84(
|
|
37269
37399
|
AutonomyPicker,
|
|
37270
37400
|
{
|
|
37271
37401
|
options: state.autonomyPicker.options,
|
|
@@ -37273,7 +37403,7 @@ function AppView({ host, runtime }) {
|
|
|
37273
37403
|
hint: state.autonomyPicker.hint
|
|
37274
37404
|
}
|
|
37275
37405
|
) : null,
|
|
37276
|
-
state.modePicker.open ? /* @__PURE__ */
|
|
37406
|
+
state.modePicker.open ? /* @__PURE__ */ jsx84(
|
|
37277
37407
|
ModePicker,
|
|
37278
37408
|
{
|
|
37279
37409
|
modes: state.modePicker.modes,
|
|
@@ -37281,7 +37411,7 @@ function AppView({ host, runtime }) {
|
|
|
37281
37411
|
hint: state.modePicker.hint
|
|
37282
37412
|
}
|
|
37283
37413
|
) : null,
|
|
37284
|
-
state.designPicker.open ? /* @__PURE__ */
|
|
37414
|
+
state.designPicker.open ? /* @__PURE__ */ jsx84(
|
|
37285
37415
|
DesignPicker,
|
|
37286
37416
|
{
|
|
37287
37417
|
kits: state.designPicker.kits,
|
|
@@ -37289,7 +37419,7 @@ function AppView({ host, runtime }) {
|
|
|
37289
37419
|
stack: state.designPicker.stack
|
|
37290
37420
|
}
|
|
37291
37421
|
) : null,
|
|
37292
|
-
state.promptPicker.open ? /* @__PURE__ */
|
|
37422
|
+
state.promptPicker.open ? /* @__PURE__ */ jsx84(
|
|
37293
37423
|
PromptPicker,
|
|
37294
37424
|
{
|
|
37295
37425
|
entries: filterPromptPicker(
|
|
@@ -37303,7 +37433,7 @@ function AppView({ host, runtime }) {
|
|
|
37303
37433
|
total: state.promptPicker.all.length
|
|
37304
37434
|
}
|
|
37305
37435
|
) : null,
|
|
37306
|
-
state.resumePicker.open ? /* @__PURE__ */
|
|
37436
|
+
state.resumePicker.open ? /* @__PURE__ */ jsx84(
|
|
37307
37437
|
ResumePicker,
|
|
37308
37438
|
{
|
|
37309
37439
|
sessions: state.resumePicker.sessions,
|
|
@@ -37313,7 +37443,7 @@ function AppView({ host, runtime }) {
|
|
|
37313
37443
|
hint: state.resumePicker.hint
|
|
37314
37444
|
}
|
|
37315
37445
|
) : null,
|
|
37316
|
-
state.settingsPicker.open ? /* @__PURE__ */
|
|
37446
|
+
state.settingsPicker.open ? /* @__PURE__ */ jsx84(
|
|
37317
37447
|
SettingsPicker,
|
|
37318
37448
|
{
|
|
37319
37449
|
field: state.settingsPicker.field,
|
|
@@ -37370,7 +37500,7 @@ function AppView({ host, runtime }) {
|
|
|
37370
37500
|
hint: state.settingsPicker.hint
|
|
37371
37501
|
}
|
|
37372
37502
|
) : null,
|
|
37373
|
-
state.statuslinePicker.open ? /* @__PURE__ */
|
|
37503
|
+
state.statuslinePicker.open ? /* @__PURE__ */ jsx84(
|
|
37374
37504
|
StatuslinePicker,
|
|
37375
37505
|
{
|
|
37376
37506
|
field: state.statuslinePicker.field,
|
|
@@ -37379,7 +37509,7 @@ function AppView({ host, runtime }) {
|
|
|
37379
37509
|
hint: state.statuslinePicker.hint
|
|
37380
37510
|
}
|
|
37381
37511
|
) : null,
|
|
37382
|
-
state.pluginPicker.open ? /* @__PURE__ */
|
|
37512
|
+
state.pluginPicker.open ? /* @__PURE__ */ jsx84(
|
|
37383
37513
|
PluginPicker,
|
|
37384
37514
|
{
|
|
37385
37515
|
items: state.pluginPicker.items,
|
|
@@ -37388,7 +37518,7 @@ function AppView({ host, runtime }) {
|
|
|
37388
37518
|
hint: state.pluginPicker.hint
|
|
37389
37519
|
}
|
|
37390
37520
|
) : null,
|
|
37391
|
-
state.mcpPicker.open ? /* @__PURE__ */
|
|
37521
|
+
state.mcpPicker.open ? /* @__PURE__ */ jsx84(
|
|
37392
37522
|
McpPicker,
|
|
37393
37523
|
{
|
|
37394
37524
|
items: state.mcpPicker.items,
|
|
@@ -37397,7 +37527,7 @@ function AppView({ host, runtime }) {
|
|
|
37397
37527
|
hint: state.mcpPicker.hint
|
|
37398
37528
|
}
|
|
37399
37529
|
) : null,
|
|
37400
|
-
state.toolsPicker.open ? /* @__PURE__ */
|
|
37530
|
+
state.toolsPicker.open ? /* @__PURE__ */ jsx84(
|
|
37401
37531
|
ToolsPicker,
|
|
37402
37532
|
{
|
|
37403
37533
|
items: state.toolsPicker.items,
|
|
@@ -37407,8 +37537,8 @@ function AppView({ host, runtime }) {
|
|
|
37407
37537
|
filter: state.toolsPicker.filter
|
|
37408
37538
|
}
|
|
37409
37539
|
) : null,
|
|
37410
|
-
state.brainPanel.open && !state.modelPicker.open ? /* @__PURE__ */
|
|
37411
|
-
state.helpPanel.open ? /* @__PURE__ */
|
|
37540
|
+
state.brainPanel.open && !state.modelPicker.open ? /* @__PURE__ */ jsx84(BrainPanel, { ...state.brainPanel }) : null,
|
|
37541
|
+
state.helpPanel.open ? /* @__PURE__ */ jsx84(
|
|
37412
37542
|
HelpPanel,
|
|
37413
37543
|
{
|
|
37414
37544
|
entries: state.helpPanel.entries,
|
|
@@ -37417,9 +37547,9 @@ function AppView({ host, runtime }) {
|
|
|
37417
37547
|
hint: state.helpPanel.hint
|
|
37418
37548
|
}
|
|
37419
37549
|
) : null,
|
|
37420
|
-
state.shadowPanel.open ? /* @__PURE__ */
|
|
37421
|
-
state.authPanel.open ? /* @__PURE__ */
|
|
37422
|
-
state.projectPicker.open && !routedToSidebar("projectPicker") ? /* @__PURE__ */
|
|
37550
|
+
state.shadowPanel.open ? /* @__PURE__ */ jsx84(ShadowPanel, { shadow: state.shadowPanel.shadow, hint: state.shadowPanel.hint }) : null,
|
|
37551
|
+
state.authPanel.open ? /* @__PURE__ */ jsx84(AuthPanel, { panel: state.authPanel }) : null,
|
|
37552
|
+
state.projectPicker.open && !routedToSidebar("projectPicker") ? /* @__PURE__ */ jsx84(
|
|
37423
37553
|
ProjectPicker,
|
|
37424
37554
|
{
|
|
37425
37555
|
items: state.projectPicker.items,
|
|
@@ -37428,8 +37558,8 @@ function AppView({ host, runtime }) {
|
|
|
37428
37558
|
hint: state.projectPicker.hint
|
|
37429
37559
|
}
|
|
37430
37560
|
) : null,
|
|
37431
|
-
state.fKeyPicker.open ? /* @__PURE__ */
|
|
37432
|
-
state.coordinator.monitorOpen && !routedToSidebar("coordinator") ? /* @__PURE__ */
|
|
37561
|
+
state.fKeyPicker.open ? /* @__PURE__ */ jsx84(FKeyPicker, { selected: state.fKeyPicker.selected }) : null,
|
|
37562
|
+
state.coordinator.monitorOpen && !routedToSidebar("coordinator") ? /* @__PURE__ */ jsx84(
|
|
37433
37563
|
CoordinatorPanel,
|
|
37434
37564
|
{
|
|
37435
37565
|
coordinator: state.coordinator,
|
|
@@ -37437,14 +37567,14 @@ function AppView({ host, runtime }) {
|
|
|
37437
37567
|
onClose: () => dispatch({ type: "toggleCoordinatorMonitor" })
|
|
37438
37568
|
}
|
|
37439
37569
|
) : null,
|
|
37440
|
-
state.auditPanelOpen ? /* @__PURE__ */
|
|
37570
|
+
state.auditPanelOpen ? /* @__PURE__ */ jsx84(
|
|
37441
37571
|
AuditPanel,
|
|
37442
37572
|
{
|
|
37443
37573
|
sideEffects: agent.ctx.sideEffects ?? [],
|
|
37444
37574
|
onClose: () => dispatch({ type: "toggleAuditPanel" })
|
|
37445
37575
|
}
|
|
37446
37576
|
) : null,
|
|
37447
|
-
state.connectionsPanelOpen && panelPositions.connections === "bottom" ? /* @__PURE__ */
|
|
37577
|
+
state.connectionsPanelOpen && panelPositions.connections === "bottom" ? /* @__PURE__ */ jsx84(
|
|
37448
37578
|
ConnectionsPanel,
|
|
37449
37579
|
{
|
|
37450
37580
|
projectRoot: agent.ctx.projectRoot,
|
|
@@ -37453,7 +37583,7 @@ function AppView({ host, runtime }) {
|
|
|
37453
37583
|
) : null,
|
|
37454
37584
|
state.rewindOverlay ? (() => {
|
|
37455
37585
|
const overlay = state.rewindOverlay;
|
|
37456
|
-
return /* @__PURE__ */
|
|
37586
|
+
return /* @__PURE__ */ jsx84(
|
|
37457
37587
|
CheckpointTimeline,
|
|
37458
37588
|
{
|
|
37459
37589
|
checkpoints: overlay.checkpoints,
|
|
@@ -37467,7 +37597,7 @@ function AppView({ host, runtime }) {
|
|
|
37467
37597
|
}
|
|
37468
37598
|
);
|
|
37469
37599
|
})() : null,
|
|
37470
|
-
state.brainPrompt ? /* @__PURE__ */
|
|
37600
|
+
state.brainPrompt ? /* @__PURE__ */ jsx84(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: /* @__PURE__ */ jsx84(
|
|
37471
37601
|
BrainDecisionPrompt,
|
|
37472
37602
|
{
|
|
37473
37603
|
...state.brainPrompt,
|
|
@@ -37486,7 +37616,7 @@ function AppView({ host, runtime }) {
|
|
|
37486
37616
|
info.resolve(decision);
|
|
37487
37617
|
dispatch({ type: "shellCommandWarningClose" });
|
|
37488
37618
|
};
|
|
37489
|
-
return /* @__PURE__ */
|
|
37619
|
+
return /* @__PURE__ */ jsx84(ShellCommandWarning, { command: info.command, onDecision });
|
|
37490
37620
|
})() : null,
|
|
37491
37621
|
state.confirmQueue.length > 0 && (() => {
|
|
37492
37622
|
const head = expectDefined5(state.confirmQueue[0]);
|
|
@@ -37510,7 +37640,7 @@ function AppView({ host, runtime }) {
|
|
|
37510
37640
|
head.resolve("yes");
|
|
37511
37641
|
dispatch({ type: "confirmClose" });
|
|
37512
37642
|
};
|
|
37513
|
-
return /* @__PURE__ */
|
|
37643
|
+
return /* @__PURE__ */ jsx84(
|
|
37514
37644
|
ConfirmPrompt,
|
|
37515
37645
|
{
|
|
37516
37646
|
toolName: head.toolName,
|
|
@@ -37523,7 +37653,7 @@ function AppView({ host, runtime }) {
|
|
|
37523
37653
|
}
|
|
37524
37654
|
);
|
|
37525
37655
|
})(),
|
|
37526
|
-
state.clearConfirm ? /* @__PURE__ */
|
|
37656
|
+
state.clearConfirm ? /* @__PURE__ */ jsx84(
|
|
37527
37657
|
ClearConfirmPanel,
|
|
37528
37658
|
{
|
|
37529
37659
|
leaderActive: state.clearConfirm.leaderActive,
|
|
@@ -37531,7 +37661,7 @@ function AppView({ host, runtime }) {
|
|
|
37531
37661
|
value: state.clearConfirm.value
|
|
37532
37662
|
}
|
|
37533
37663
|
) : null,
|
|
37534
|
-
state.exitConfirm ? /* @__PURE__ */
|
|
37664
|
+
state.exitConfirm ? /* @__PURE__ */ jsx84(
|
|
37535
37665
|
ExitConfirmPanel,
|
|
37536
37666
|
{
|
|
37537
37667
|
leaderActive: state.exitConfirm.leaderActive,
|
|
@@ -37539,14 +37669,14 @@ function AppView({ host, runtime }) {
|
|
|
37539
37669
|
backgroundCount: state.exitConfirm.backgroundCount
|
|
37540
37670
|
}
|
|
37541
37671
|
) : null,
|
|
37542
|
-
state.slashConfirm ? /* @__PURE__ */
|
|
37672
|
+
state.slashConfirm ? /* @__PURE__ */ jsx84(
|
|
37543
37673
|
SlashConfirmPanel,
|
|
37544
37674
|
{
|
|
37545
37675
|
question: state.slashConfirm.question,
|
|
37546
37676
|
defaultYes: state.slashConfirm.defaultYes
|
|
37547
37677
|
}
|
|
37548
37678
|
) : null,
|
|
37549
|
-
state.escConfirm ? /* @__PURE__ */
|
|
37679
|
+
state.escConfirm ? /* @__PURE__ */ jsx84(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: /* @__PURE__ */ jsx84(
|
|
37550
37680
|
EscConfirmPrompt,
|
|
37551
37681
|
{
|
|
37552
37682
|
runningTools: state.escConfirm.snapshot.runningTools,
|
|
@@ -37586,6 +37716,40 @@ function AppView({ host, runtime }) {
|
|
|
37586
37716
|
}
|
|
37587
37717
|
}
|
|
37588
37718
|
) }) : null,
|
|
37719
|
+
state.fallbackOverlay ? /* @__PURE__ */ jsx84(Box, { flexDirection: "column", marginY: 1, flexShrink: 0, children: (() => {
|
|
37720
|
+
const ov = state.fallbackOverlay;
|
|
37721
|
+
let resolved = false;
|
|
37722
|
+
const finish = (choice) => {
|
|
37723
|
+
if (resolved) return;
|
|
37724
|
+
resolved = true;
|
|
37725
|
+
if (choice) {
|
|
37726
|
+
events.emit("provider.fallback_choice", {
|
|
37727
|
+
requestId: ov.requestId,
|
|
37728
|
+
providerId: choice.providerId,
|
|
37729
|
+
model: choice.model
|
|
37730
|
+
});
|
|
37731
|
+
} else {
|
|
37732
|
+
events.emit("provider.fallback_choice", {
|
|
37733
|
+
requestId: ov.requestId,
|
|
37734
|
+
autoSwitch: true
|
|
37735
|
+
});
|
|
37736
|
+
}
|
|
37737
|
+
dispatch({ type: "fallbackOverlayClose" });
|
|
37738
|
+
};
|
|
37739
|
+
return /* @__PURE__ */ jsx84(
|
|
37740
|
+
FallbackOverlay,
|
|
37741
|
+
{
|
|
37742
|
+
requestId: ov.requestId,
|
|
37743
|
+
from: ov.from,
|
|
37744
|
+
status: ov.status,
|
|
37745
|
+
candidates: ov.candidates,
|
|
37746
|
+
autoSwitchSeconds: ov.autoSwitchSeconds,
|
|
37747
|
+
selected: ov.selected,
|
|
37748
|
+
onChoose: finish,
|
|
37749
|
+
onMove: (delta) => dispatch({ type: "fallbackOverlayMove", delta })
|
|
37750
|
+
}
|
|
37751
|
+
);
|
|
37752
|
+
})() }) : null,
|
|
37589
37753
|
state.sendModePicker ? (() => {
|
|
37590
37754
|
const info = state.sendModePicker;
|
|
37591
37755
|
let resolved = false;
|
|
@@ -37594,7 +37758,7 @@ function AppView({ host, runtime }) {
|
|
|
37594
37758
|
resolved = true;
|
|
37595
37759
|
info.resolve(decision);
|
|
37596
37760
|
};
|
|
37597
|
-
return /* @__PURE__ */
|
|
37761
|
+
return /* @__PURE__ */ jsx84(
|
|
37598
37762
|
SendModePicker,
|
|
37599
37763
|
{
|
|
37600
37764
|
selected: info.selected,
|
|
@@ -37612,7 +37776,7 @@ function AppView({ host, runtime }) {
|
|
|
37612
37776
|
resolved = true;
|
|
37613
37777
|
info.resolve(decision);
|
|
37614
37778
|
};
|
|
37615
|
-
return /* @__PURE__ */
|
|
37779
|
+
return /* @__PURE__ */ jsx84(
|
|
37616
37780
|
RefineCountdownPanel,
|
|
37617
37781
|
{
|
|
37618
37782
|
original: info.original,
|
|
@@ -37623,7 +37787,7 @@ function AppView({ host, runtime }) {
|
|
|
37623
37787
|
}
|
|
37624
37788
|
);
|
|
37625
37789
|
})() : null,
|
|
37626
|
-
state.enhanceBusy && !state.enhance ? /* @__PURE__ */
|
|
37790
|
+
state.enhanceBusy && !state.enhance ? /* @__PURE__ */ jsx84(
|
|
37627
37791
|
RefiningPanel,
|
|
37628
37792
|
{
|
|
37629
37793
|
original: enhanceOriginalRef.current,
|
|
@@ -37642,7 +37806,7 @@ function AppView({ host, runtime }) {
|
|
|
37642
37806
|
setEnhanceCountdown(null);
|
|
37643
37807
|
info.resolve(decision);
|
|
37644
37808
|
};
|
|
37645
|
-
return /* @__PURE__ */
|
|
37809
|
+
return /* @__PURE__ */ jsx84(
|
|
37646
37810
|
EnhancePanel,
|
|
37647
37811
|
{
|
|
37648
37812
|
original: info.original,
|
|
@@ -37666,7 +37830,7 @@ function AppView({ host, runtime }) {
|
|
|
37666
37830
|
resolved = true;
|
|
37667
37831
|
info.resolve(decision);
|
|
37668
37832
|
};
|
|
37669
|
-
return /* @__PURE__ */
|
|
37833
|
+
return /* @__PURE__ */ jsx84(
|
|
37670
37834
|
RefineFailurePanel,
|
|
37671
37835
|
{
|
|
37672
37836
|
original: info.original,
|
|
@@ -37686,7 +37850,7 @@ function AppView({ host, runtime }) {
|
|
|
37686
37850
|
resolved = true;
|
|
37687
37851
|
info.resolve(decision);
|
|
37688
37852
|
};
|
|
37689
|
-
return /* @__PURE__ */
|
|
37853
|
+
return /* @__PURE__ */ jsx84(
|
|
37690
37854
|
ContinueConfirmPanel,
|
|
37691
37855
|
{
|
|
37692
37856
|
label: info.label,
|
|
@@ -37698,11 +37862,11 @@ function AppView({ host, runtime }) {
|
|
|
37698
37862
|
}
|
|
37699
37863
|
);
|
|
37700
37864
|
})() : null,
|
|
37701
|
-
/* @__PURE__ */
|
|
37865
|
+
/* @__PURE__ */ jsx84(AppStatusRegion, { host, runtime, mainColumnWidth })
|
|
37702
37866
|
] })
|
|
37703
37867
|
] }),
|
|
37704
|
-
sidebarWidth > 0 ? /* @__PURE__ */
|
|
37705
|
-
sidebarSlotVisible("projectPicker") ? /* @__PURE__ */
|
|
37868
|
+
sidebarWidth > 0 ? /* @__PURE__ */ jsxs81(RightSidebar, { width: sidebarWidth, maxHeight: runtime.termRows, focused: state.sidebarFocused, children: [
|
|
37869
|
+
sidebarSlotVisible("projectPicker") ? /* @__PURE__ */ jsx84(
|
|
37706
37870
|
ProjectPickerSidebar,
|
|
37707
37871
|
{
|
|
37708
37872
|
items: state.projectPicker.items,
|
|
@@ -37713,7 +37877,7 @@ function AppView({ host, runtime }) {
|
|
|
37713
37877
|
width: sidebarContentWidth
|
|
37714
37878
|
}
|
|
37715
37879
|
) : null,
|
|
37716
|
-
sidebarSlotVisible("fleet") ? /* @__PURE__ */
|
|
37880
|
+
sidebarSlotVisible("fleet") ? /* @__PURE__ */ jsx84(
|
|
37717
37881
|
FleetPanelSidebar,
|
|
37718
37882
|
{
|
|
37719
37883
|
entries: statusbar.entriesWithLeader,
|
|
@@ -37721,7 +37885,7 @@ function AppView({ host, runtime }) {
|
|
|
37721
37885
|
width: sidebarContentWidth
|
|
37722
37886
|
}
|
|
37723
37887
|
) : null,
|
|
37724
|
-
sidebarSlotVisible("agents") ? /* @__PURE__ */
|
|
37888
|
+
sidebarSlotVisible("agents") ? /* @__PURE__ */ jsx84(
|
|
37725
37889
|
AgentsPanelSidebar,
|
|
37726
37890
|
{
|
|
37727
37891
|
entries: statusbar.entriesWithLeader,
|
|
@@ -37730,14 +37894,14 @@ function AppView({ host, runtime }) {
|
|
|
37730
37894
|
width: sidebarContentWidth
|
|
37731
37895
|
}
|
|
37732
37896
|
) : null,
|
|
37733
|
-
sidebarSlotVisible("worktree") ? /* @__PURE__ */
|
|
37897
|
+
sidebarSlotVisible("worktree") ? /* @__PURE__ */ jsx84(
|
|
37734
37898
|
WorktreePanelSidebar,
|
|
37735
37899
|
{
|
|
37736
37900
|
worktrees: state.worktrees,
|
|
37737
37901
|
width: sidebarContentWidth
|
|
37738
37902
|
}
|
|
37739
37903
|
) : null,
|
|
37740
|
-
sidebarSlotVisible("plan") ? /* @__PURE__ */
|
|
37904
|
+
sidebarSlotVisible("plan") ? /* @__PURE__ */ jsx84(
|
|
37741
37905
|
PlanPanelSidebar,
|
|
37742
37906
|
{
|
|
37743
37907
|
openCount: sidebarPlanData.items.filter((item) => item.status === "open").length,
|
|
@@ -37748,21 +37912,21 @@ function AppView({ host, runtime }) {
|
|
|
37748
37912
|
width: sidebarContentWidth
|
|
37749
37913
|
}
|
|
37750
37914
|
) : null,
|
|
37751
|
-
sidebarSlotVisible("todos") ? /* @__PURE__ */
|
|
37915
|
+
sidebarSlotVisible("todos") ? /* @__PURE__ */ jsx84(
|
|
37752
37916
|
TodosPanelSidebar,
|
|
37753
37917
|
{
|
|
37754
37918
|
todos: liveTodos ?? [],
|
|
37755
37919
|
width: sidebarContentWidth
|
|
37756
37920
|
}
|
|
37757
37921
|
) : null,
|
|
37758
|
-
sidebarSlotVisible("queue") ? /* @__PURE__ */
|
|
37922
|
+
sidebarSlotVisible("queue") ? /* @__PURE__ */ jsx84(
|
|
37759
37923
|
QueuePanelSidebar,
|
|
37760
37924
|
{
|
|
37761
37925
|
items: state.queue,
|
|
37762
37926
|
width: sidebarContentWidth
|
|
37763
37927
|
}
|
|
37764
37928
|
) : null,
|
|
37765
|
-
sidebarSlotVisible("processList") ? /* @__PURE__ */
|
|
37929
|
+
sidebarSlotVisible("processList") ? /* @__PURE__ */ jsx84(
|
|
37766
37930
|
ProcessListPanelSidebar,
|
|
37767
37931
|
{
|
|
37768
37932
|
activeCount: sidebarProcessData.activeCount,
|
|
@@ -37771,7 +37935,7 @@ function AppView({ host, runtime }) {
|
|
|
37771
37935
|
width: sidebarContentWidth
|
|
37772
37936
|
}
|
|
37773
37937
|
) : null,
|
|
37774
|
-
sidebarSlotVisible("goal") ? /* @__PURE__ */
|
|
37938
|
+
sidebarSlotVisible("goal") ? /* @__PURE__ */ jsx84(
|
|
37775
37939
|
GoalPanelSidebar,
|
|
37776
37940
|
{
|
|
37777
37941
|
goal: state.goalSummary,
|
|
@@ -37779,7 +37943,7 @@ function AppView({ host, runtime }) {
|
|
|
37779
37943
|
width: sidebarContentWidth
|
|
37780
37944
|
}
|
|
37781
37945
|
) : null,
|
|
37782
|
-
sidebarSlotVisible("sessions") ? /* @__PURE__ */
|
|
37946
|
+
sidebarSlotVisible("sessions") ? /* @__PURE__ */ jsx84(
|
|
37783
37947
|
SessionsPanelSidebar,
|
|
37784
37948
|
{
|
|
37785
37949
|
liveSessions: state.sessionsPanel.sessions,
|
|
@@ -37788,7 +37952,7 @@ function AppView({ host, runtime }) {
|
|
|
37788
37952
|
width: sidebarContentWidth
|
|
37789
37953
|
}
|
|
37790
37954
|
) : null,
|
|
37791
|
-
sidebarSlotVisible("coordinator") ? /* @__PURE__ */
|
|
37955
|
+
sidebarSlotVisible("coordinator") ? /* @__PURE__ */ jsx84(
|
|
37792
37956
|
CoordinatorPanelSidebar,
|
|
37793
37957
|
{
|
|
37794
37958
|
running: state.coordinator.monitorOpen || (state.goalRun?.monitorOpen ?? false),
|
|
@@ -37799,7 +37963,7 @@ function AppView({ host, runtime }) {
|
|
|
37799
37963
|
width: sidebarContentWidth
|
|
37800
37964
|
}
|
|
37801
37965
|
) : null,
|
|
37802
|
-
sidebarSlotVisible("kanban") ? /* @__PURE__ */
|
|
37966
|
+
sidebarSlotVisible("kanban") ? /* @__PURE__ */ jsx84(
|
|
37803
37967
|
KanbanPanelSidebar,
|
|
37804
37968
|
{
|
|
37805
37969
|
columns: sidebarKanbanData.columns,
|
|
@@ -37808,19 +37972,19 @@ function AppView({ host, runtime }) {
|
|
|
37808
37972
|
width: sidebarContentWidth
|
|
37809
37973
|
}
|
|
37810
37974
|
) : null,
|
|
37811
|
-
sidebarSlotVisible("connections") ? /* @__PURE__ */
|
|
37975
|
+
sidebarSlotVisible("connections") ? /* @__PURE__ */ jsx84(
|
|
37812
37976
|
ConnectionsPanelSidebar,
|
|
37813
37977
|
{
|
|
37814
37978
|
connections: sidebarConnectionsData,
|
|
37815
37979
|
width: sidebarContentWidth
|
|
37816
37980
|
}
|
|
37817
37981
|
) : null,
|
|
37818
|
-
hiddenSidebarPanelCount > 0 ? /* @__PURE__ */
|
|
37982
|
+
hiddenSidebarPanelCount > 0 ? /* @__PURE__ */ jsxs81(Text, { color: theme.textMuted, children: [
|
|
37819
37983
|
"+",
|
|
37820
37984
|
hiddenSidebarPanelCount,
|
|
37821
37985
|
" more"
|
|
37822
37986
|
] }) : null,
|
|
37823
|
-
/* @__PURE__ */
|
|
37987
|
+
/* @__PURE__ */ jsx84(
|
|
37824
37988
|
SidebarContent,
|
|
37825
37989
|
{
|
|
37826
37990
|
contextWindow: statusbar.contextWindow,
|
|
@@ -39857,7 +40021,7 @@ function createAppKeyHandler(options) {
|
|
|
39857
40021
|
|
|
39858
40022
|
// src/app.tsx
|
|
39859
40023
|
import { buildGoalPreamble as buildGoalPreamble2 } from "@wrongstack/core/execution";
|
|
39860
|
-
import { jsx as
|
|
40024
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
39861
40025
|
function App(props) {
|
|
39862
40026
|
const {
|
|
39863
40027
|
agent,
|
|
@@ -40025,7 +40189,7 @@ function App(props) {
|
|
|
40025
40189
|
initialFleetChat: fleetStreamController?.mode,
|
|
40026
40190
|
sessionsDir
|
|
40027
40191
|
});
|
|
40028
|
-
const historyScrollRef =
|
|
40192
|
+
const historyScrollRef = useRef39(null);
|
|
40029
40193
|
const onScrollInfo = useCallback26(
|
|
40030
40194
|
(info) => dispatch({ type: "setHistoryScrolled", scrolled: info.scrolled }),
|
|
40031
40195
|
[dispatch]
|
|
@@ -40143,7 +40307,7 @@ function App(props) {
|
|
|
40143
40307
|
// render the mission card on the sidebar.
|
|
40144
40308
|
(liveSettings?.showAgentSwarmPanel ?? "bottom") === "sidebar"
|
|
40145
40309
|
);
|
|
40146
|
-
|
|
40310
|
+
useEffect71(() => {
|
|
40147
40311
|
titleController?.setModel(liveModel);
|
|
40148
40312
|
}, [titleController, liveModel]);
|
|
40149
40313
|
const activity = useTuiActivity({
|
|
@@ -40183,7 +40347,7 @@ function App(props) {
|
|
|
40183
40347
|
dispatch,
|
|
40184
40348
|
open: state.authPanel.open
|
|
40185
40349
|
});
|
|
40186
|
-
|
|
40350
|
+
useEffect71(() => {
|
|
40187
40351
|
if (!secretInputController) return;
|
|
40188
40352
|
const previousSecret = secretInputController.readSecret;
|
|
40189
40353
|
const previousText = secretInputController.readText;
|
|
@@ -40248,8 +40412,8 @@ function App(props) {
|
|
|
40248
40412
|
draftRef.current = { buffer: "", cursor: 0 };
|
|
40249
40413
|
dispatch({ type: "clearInput" });
|
|
40250
40414
|
};
|
|
40251
|
-
const staleGuardRef =
|
|
40252
|
-
|
|
40415
|
+
const staleGuardRef = useRef39(JSON.stringify({ a: "", y: false, m: "", model: "", provider: "" }));
|
|
40416
|
+
useEffect71(() => {
|
|
40253
40417
|
const poll = () => {
|
|
40254
40418
|
const a = getAutonomy?.() ?? "off";
|
|
40255
40419
|
const y = getYolo?.() ?? false;
|
|
@@ -40790,7 +40954,7 @@ function App(props) {
|
|
|
40790
40954
|
fleetRunning: fleetCounts?.running ?? 0,
|
|
40791
40955
|
liveAnimationStyle
|
|
40792
40956
|
});
|
|
40793
|
-
return /* @__PURE__ */
|
|
40957
|
+
return /* @__PURE__ */ jsx85(
|
|
40794
40958
|
AppView,
|
|
40795
40959
|
{
|
|
40796
40960
|
host: props,
|