@wrongstack/webui 0.68.0 → 0.77.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/assets/index-Df1jRLwk.css +1 -0
- package/dist/assets/index-H4ofeiKr.js +94 -0
- package/dist/assets/{vendor-CzdG0ns2.js → vendor-DBuK7aZd.js} +74 -79
- package/dist/index.css +23 -0
- package/dist/index.css.map +1 -1
- package/dist/index.html +3 -3
- package/dist/index.js +165 -88
- package/dist/index.js.map +1 -1
- package/dist/server/entry.js +27 -0
- package/dist/server/entry.js.map +1 -1
- package/dist/server/index.js +27 -0
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/assets/index-BeXRAkSS.js +0 -94
- package/dist/assets/index-C_0-qbQ-.css +0 -1
package/dist/index.js
CHANGED
|
@@ -408,6 +408,10 @@ var WrongStackWebSocketClient = class {
|
|
|
408
408
|
clearTodos() {
|
|
409
409
|
this.send({ type: "todos.clear" });
|
|
410
410
|
}
|
|
411
|
+
removeTodo(idOrIndex) {
|
|
412
|
+
const payload = typeof idOrIndex === "number" ? { index: idOrIndex } : { id: idOrIndex };
|
|
413
|
+
this.send({ type: "todos.remove", payload });
|
|
414
|
+
}
|
|
411
415
|
listSessions(limit = 50) {
|
|
412
416
|
this.send({ type: "sessions.list", payload: { limit } });
|
|
413
417
|
}
|
|
@@ -1137,6 +1141,8 @@ function handleKeyOperationResult(msg) {
|
|
|
1137
1141
|
const p = msg.payload;
|
|
1138
1142
|
if (p.success) toast.success(p.message);
|
|
1139
1143
|
else toast.error(p.message);
|
|
1144
|
+
const client2 = getWSClient(useConfigStore.getState().wsUrl);
|
|
1145
|
+
client2.listSavedProviders();
|
|
1140
1146
|
}
|
|
1141
1147
|
function handleContextCompacted(msg) {
|
|
1142
1148
|
const payload = msg.payload;
|
|
@@ -1252,7 +1258,8 @@ function handleRunResult(msg) {
|
|
|
1252
1258
|
const runStart = useChatStore.getState().runStart;
|
|
1253
1259
|
if (runStart && payload.status === "done") {
|
|
1254
1260
|
const all = useChatStore.getState().messages;
|
|
1255
|
-
let lastAssistantIdx = -1
|
|
1261
|
+
let lastAssistantIdx = -1;
|
|
1262
|
+
let toolCount = 0;
|
|
1256
1263
|
for (let i = all.length - 1; i >= 0; i--) {
|
|
1257
1264
|
const m = all[i];
|
|
1258
1265
|
if (m.role === "assistant" && lastAssistantIdx === -1 && m.content) lastAssistantIdx = i;
|
|
@@ -1602,7 +1609,7 @@ function useWebSocket() {
|
|
|
1602
1609
|
}
|
|
1603
1610
|
|
|
1604
1611
|
// src/App.tsx
|
|
1605
|
-
import { useEffect as
|
|
1612
|
+
import { useEffect as useEffect22 } from "react";
|
|
1606
1613
|
|
|
1607
1614
|
// src/components/ChatView/index.tsx
|
|
1608
1615
|
import {
|
|
@@ -5367,15 +5374,16 @@ function CollabPanel({ sessionId, className }) {
|
|
|
5367
5374
|
const offs = [];
|
|
5368
5375
|
offs.push(
|
|
5369
5376
|
client2.on("collab.state", (msg) => {
|
|
5370
|
-
|
|
5371
|
-
|
|
5377
|
+
const p = msg.payload;
|
|
5378
|
+
if (p.sessionId === sessionId) {
|
|
5379
|
+
setParticipants(p.participants ?? []);
|
|
5372
5380
|
}
|
|
5373
5381
|
})
|
|
5374
5382
|
);
|
|
5375
5383
|
offs.push(
|
|
5376
5384
|
client2.on("collab.participant.joined", (msg) => {
|
|
5377
|
-
if (msg?.payload?.sessionId !== sessionId) return;
|
|
5378
5385
|
const p = msg.payload;
|
|
5386
|
+
if (p.sessionId !== sessionId) return;
|
|
5379
5387
|
setParticipants((prev) => {
|
|
5380
5388
|
if (prev.some((x) => x.participantId === p.participantId)) return prev;
|
|
5381
5389
|
return [...prev, { participantId: p.participantId, role: p.role, joinedAt: p.joinedAt }];
|
|
@@ -5384,15 +5392,17 @@ function CollabPanel({ sessionId, className }) {
|
|
|
5384
5392
|
);
|
|
5385
5393
|
offs.push(
|
|
5386
5394
|
client2.on("collab.participant.left", (msg) => {
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5395
|
+
const p = msg.payload;
|
|
5396
|
+
if (p.sessionId !== sessionId) return;
|
|
5397
|
+
const id = p.participantId;
|
|
5398
|
+
setParticipants((prev) => prev.filter((p2) => p2.participantId !== id));
|
|
5390
5399
|
})
|
|
5391
5400
|
);
|
|
5392
5401
|
offs.push(
|
|
5393
5402
|
client2.on("error", (msg) => {
|
|
5394
|
-
|
|
5395
|
-
|
|
5403
|
+
const p = msg.payload;
|
|
5404
|
+
if (p.phase === "collab") {
|
|
5405
|
+
setError(p.message);
|
|
5396
5406
|
setJoined(false);
|
|
5397
5407
|
}
|
|
5398
5408
|
})
|
|
@@ -5401,26 +5411,30 @@ function CollabPanel({ sessionId, className }) {
|
|
|
5401
5411
|
}));
|
|
5402
5412
|
offs.push(
|
|
5403
5413
|
client2.on("collab.annotation.added", (msg) => {
|
|
5404
|
-
|
|
5405
|
-
if (
|
|
5414
|
+
const p = msg.payload;
|
|
5415
|
+
if (p.sessionId !== sessionId) return;
|
|
5416
|
+
if (p.annotation?.resolved) return;
|
|
5406
5417
|
setOpenAnnotationCount((c) => c + 1);
|
|
5407
5418
|
})
|
|
5408
5419
|
);
|
|
5409
5420
|
offs.push(
|
|
5410
5421
|
client2.on("collab.annotation.resolved", (msg) => {
|
|
5411
|
-
|
|
5422
|
+
const p = msg.payload;
|
|
5423
|
+
if (p.sessionId !== sessionId) return;
|
|
5412
5424
|
setOpenAnnotationCount((c) => Math.max(0, c - 1));
|
|
5413
5425
|
})
|
|
5414
5426
|
);
|
|
5415
5427
|
offs.push(
|
|
5416
5428
|
client2.on("collab.pause.granted", (msg) => {
|
|
5417
|
-
|
|
5429
|
+
const p = msg.payload;
|
|
5430
|
+
if (p.sessionId !== sessionId) return;
|
|
5418
5431
|
setPaused(true);
|
|
5419
5432
|
})
|
|
5420
5433
|
);
|
|
5421
5434
|
offs.push(
|
|
5422
5435
|
client2.on("collab.pause.released", (msg) => {
|
|
5423
|
-
|
|
5436
|
+
const p = msg.payload;
|
|
5437
|
+
if (p.sessionId !== sessionId) return;
|
|
5424
5438
|
setPaused(false);
|
|
5425
5439
|
})
|
|
5426
5440
|
);
|
|
@@ -6359,8 +6373,6 @@ function QuickModelSwitcher() {
|
|
|
6359
6373
|
|
|
6360
6374
|
// src/components/SettingsPanel/index.tsx
|
|
6361
6375
|
import {
|
|
6362
|
-
AlertCircle,
|
|
6363
|
-
CheckCircle2 as CheckCircle26,
|
|
6364
6376
|
Cpu as Cpu6,
|
|
6365
6377
|
Globe as Globe3,
|
|
6366
6378
|
Monitor as Monitor3,
|
|
@@ -6907,7 +6919,6 @@ function SettingsPanel() {
|
|
|
6907
6919
|
const [isLoadingCatalog, setIsLoadingCatalog] = useState23(false);
|
|
6908
6920
|
const [isLoadingModels, setIsLoadingModels] = useState23(false);
|
|
6909
6921
|
const [isLoadingSaved, setIsLoadingSaved] = useState23(false);
|
|
6910
|
-
const [operationStatus, setOperationStatus] = useState23(null);
|
|
6911
6922
|
const [providerTab, setProviderTab] = useState23("catalog");
|
|
6912
6923
|
const [catalogQuery, setCatalogQuery] = useState23("");
|
|
6913
6924
|
const currentCatalogProvider = catalogProviders.find((p) => p.id === provider);
|
|
@@ -6935,19 +6946,10 @@ function SettingsPanel() {
|
|
|
6935
6946
|
if (next.length > 0) setProviderTab("saved");
|
|
6936
6947
|
}
|
|
6937
6948
|
};
|
|
6938
|
-
const handleKeyOperationResult2 = (msg) => {
|
|
6939
|
-
if (msg.type === "key.operation_result") {
|
|
6940
|
-
const payload = msg.payload;
|
|
6941
|
-
setOperationStatus(payload);
|
|
6942
|
-
setTimeout(() => setOperationStatus(null), 3e3);
|
|
6943
|
-
wsClient.listSavedProviders();
|
|
6944
|
-
}
|
|
6945
|
-
};
|
|
6946
6949
|
if (!wsConnected || !wsClient) return;
|
|
6947
6950
|
const off1 = wsClient.on("provider.catalog", handleProviderCatalog);
|
|
6948
6951
|
const off2 = wsClient.on("provider.models", handleProviderModels);
|
|
6949
6952
|
const off3 = wsClient.on("providers.saved", handleSavedProviders);
|
|
6950
|
-
const off4 = wsClient.on("key.operation_result", handleKeyOperationResult2);
|
|
6951
6953
|
setIsLoadingCatalog(true);
|
|
6952
6954
|
setIsLoadingSaved(true);
|
|
6953
6955
|
wsClient.listProviders();
|
|
@@ -6956,7 +6958,6 @@ function SettingsPanel() {
|
|
|
6956
6958
|
off1?.();
|
|
6957
6959
|
off2?.();
|
|
6958
6960
|
off3?.();
|
|
6959
|
-
off4?.();
|
|
6960
6961
|
};
|
|
6961
6962
|
}, [wsConnected, wsClient]);
|
|
6962
6963
|
const handleProviderSelect = useCallback5(
|
|
@@ -6974,7 +6975,7 @@ function SettingsPanel() {
|
|
|
6974
6975
|
setModel(modelId);
|
|
6975
6976
|
const currentProvider = useConfigStore.getState().provider;
|
|
6976
6977
|
ws.switchModel?.(currentProvider, modelId);
|
|
6977
|
-
|
|
6978
|
+
toast.success(`Switching to ${currentProvider} / ${modelId}\u2026`);
|
|
6978
6979
|
},
|
|
6979
6980
|
[setModel, ws]
|
|
6980
6981
|
);
|
|
@@ -7032,41 +7033,26 @@ function SettingsPanel() {
|
|
|
7032
7033
|
"Appearance"
|
|
7033
7034
|
] })
|
|
7034
7035
|
] }),
|
|
7035
|
-
/* @__PURE__ */
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
savedProviders,
|
|
7056
|
-
isLoadingSaved,
|
|
7057
|
-
providerTab,
|
|
7058
|
-
setProviderTab,
|
|
7059
|
-
onSelectProvider: handleProviderSelect,
|
|
7060
|
-
onAddKey: handleAddKey,
|
|
7061
|
-
onDeleteKey: handleDeleteKey,
|
|
7062
|
-
onSetActiveKey: handleSetActiveKey,
|
|
7063
|
-
onAddProvider: handleAddProvider,
|
|
7064
|
-
onRemoveProvider: handleRemoveProvider,
|
|
7065
|
-
catalogQuery,
|
|
7066
|
-
setCatalogQuery
|
|
7067
|
-
}
|
|
7068
|
-
)
|
|
7069
|
-
] }),
|
|
7036
|
+
/* @__PURE__ */ jsx37(TabsContent, { value: "provider", className: "space-y-4", children: /* @__PURE__ */ jsx37(
|
|
7037
|
+
ProviderSection,
|
|
7038
|
+
{
|
|
7039
|
+
activeProvider: provider,
|
|
7040
|
+
catalogProviders,
|
|
7041
|
+
isLoadingCatalog,
|
|
7042
|
+
savedProviders,
|
|
7043
|
+
isLoadingSaved,
|
|
7044
|
+
providerTab,
|
|
7045
|
+
setProviderTab,
|
|
7046
|
+
onSelectProvider: handleProviderSelect,
|
|
7047
|
+
onAddKey: handleAddKey,
|
|
7048
|
+
onDeleteKey: handleDeleteKey,
|
|
7049
|
+
onSetActiveKey: handleSetActiveKey,
|
|
7050
|
+
onAddProvider: handleAddProvider,
|
|
7051
|
+
onRemoveProvider: handleRemoveProvider,
|
|
7052
|
+
catalogQuery,
|
|
7053
|
+
setCatalogQuery
|
|
7054
|
+
}
|
|
7055
|
+
) }),
|
|
7070
7056
|
/* @__PURE__ */ jsx37(TabsContent, { value: "model", className: "space-y-4", children: /* @__PURE__ */ jsx37(
|
|
7071
7057
|
ModelSection,
|
|
7072
7058
|
{
|
|
@@ -7334,7 +7320,7 @@ import { useEffect as useEffect20, useState as useState25 } from "react";
|
|
|
7334
7320
|
|
|
7335
7321
|
// src/components/Sidebar/ConfigSection.tsx
|
|
7336
7322
|
import {
|
|
7337
|
-
CheckCircle2 as
|
|
7323
|
+
CheckCircle2 as CheckCircle26,
|
|
7338
7324
|
Circle,
|
|
7339
7325
|
CircleDot,
|
|
7340
7326
|
Database as Database2,
|
|
@@ -7418,7 +7404,7 @@ function ConfigSection({ formatDuration: formatDuration2 }) {
|
|
|
7418
7404
|
] }),
|
|
7419
7405
|
/* @__PURE__ */ jsx39("div", { className: cn("relative h-1.5 w-full overflow-hidden rounded-full bg-muted", running > 0 && "bar-sweep"), title: `${pct}% complete`, children: /* @__PURE__ */ jsx39("div", { className: cn("h-full rounded-full transition-all duration-500", allDone ? "bg-[hsl(var(--success))]" : "bg-primary"), style: { width: `${Math.max(pct, running > 0 ? 4 : 0)}%` } }) }),
|
|
7420
7406
|
/* @__PURE__ */ jsx39("ul", { className: "space-y-0.5 max-h-56 overflow-y-auto pr-1 -mx-1", children: todos.map((t) => {
|
|
7421
|
-
const Icon2 = t.status === "completed" ?
|
|
7407
|
+
const Icon2 = t.status === "completed" ? CheckCircle26 : t.status === "in_progress" ? CircleDot : Circle;
|
|
7422
7408
|
const active = t.status === "in_progress";
|
|
7423
7409
|
const tone2 = t.status === "completed" ? "text-[hsl(var(--success))] line-through opacity-60" : active ? "text-foreground" : "text-muted-foreground";
|
|
7424
7410
|
return /* @__PURE__ */ jsxs34("li", { className: cn("flex items-start gap-2 text-xs leading-snug rounded-md px-1.5 py-1 transition-colors", active && "bg-primary/10 ring-1 ring-inset ring-primary/20", tone2), children: [
|
|
@@ -7830,8 +7816,98 @@ function Sidebar() {
|
|
|
7830
7816
|
] });
|
|
7831
7817
|
}
|
|
7832
7818
|
|
|
7819
|
+
// src/components/TodosPanel.tsx
|
|
7820
|
+
import { CheckCircle2 as CheckCircle27, Circle as Circle2, Clock as Clock3, X as X8 } from "lucide-react";
|
|
7821
|
+
import { useCallback as useCallback6, useEffect as useEffect21, useRef as useRef12, useState as useState26 } from "react";
|
|
7822
|
+
import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7823
|
+
function TodosPanel() {
|
|
7824
|
+
const [todos, setTodos] = useState26([]);
|
|
7825
|
+
const ws = getWSClient();
|
|
7826
|
+
const offRef = useRef12(null);
|
|
7827
|
+
useEffect21(() => {
|
|
7828
|
+
ws.send({ type: "todos.get" });
|
|
7829
|
+
offRef.current = ws.on("todos.updated", (msg) => {
|
|
7830
|
+
const payload = msg?.payload;
|
|
7831
|
+
if (payload?.todos) setTodos(payload.todos);
|
|
7832
|
+
});
|
|
7833
|
+
return () => {
|
|
7834
|
+
offRef.current?.();
|
|
7835
|
+
};
|
|
7836
|
+
}, [ws]);
|
|
7837
|
+
const handleRemove = useCallback6(
|
|
7838
|
+
(id) => {
|
|
7839
|
+
ws.removeTodo(id);
|
|
7840
|
+
},
|
|
7841
|
+
[ws]
|
|
7842
|
+
);
|
|
7843
|
+
const pending = todos.filter((t) => t.status === "pending");
|
|
7844
|
+
const inProgress = todos.filter((t) => t.status === "in_progress");
|
|
7845
|
+
const completed = todos.filter((t) => t.status === "completed");
|
|
7846
|
+
return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col h-full bg-background", children: [
|
|
7847
|
+
/* @__PURE__ */ jsxs38("div", { className: "px-4 py-3 border-b border-border flex items-center justify-between shrink-0", children: [
|
|
7848
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
7849
|
+
/* @__PURE__ */ jsx43("h2", { className: "text-sm font-semibold text-foreground", children: "TODOS" }),
|
|
7850
|
+
/* @__PURE__ */ jsxs38("span", { className: "text-xs text-muted-foreground tabular-nums", children: [
|
|
7851
|
+
completed.length,
|
|
7852
|
+
"/",
|
|
7853
|
+
todos.length
|
|
7854
|
+
] })
|
|
7855
|
+
] }),
|
|
7856
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
7857
|
+
inProgress.length > 0 && /* @__PURE__ */ jsxs38("span", { className: "flex items-center gap-1 text-yellow-600 dark:text-yellow-400", children: [
|
|
7858
|
+
/* @__PURE__ */ jsx43(Clock3, { className: "w-3 h-3" }),
|
|
7859
|
+
inProgress.length
|
|
7860
|
+
] }),
|
|
7861
|
+
pending.length > 0 && /* @__PURE__ */ jsxs38("span", { className: "flex items-center gap-1 text-muted-foreground", children: [
|
|
7862
|
+
/* @__PURE__ */ jsx43(Circle2, { className: "w-3 h-3" }),
|
|
7863
|
+
pending.length
|
|
7864
|
+
] }),
|
|
7865
|
+
completed.length > 0 && /* @__PURE__ */ jsxs38("span", { className: "flex items-center gap-1 text-emerald-600 dark:text-emerald-400", children: [
|
|
7866
|
+
/* @__PURE__ */ jsx43(CheckCircle27, { className: "w-3 h-3" }),
|
|
7867
|
+
completed.length
|
|
7868
|
+
] })
|
|
7869
|
+
] })
|
|
7870
|
+
] }),
|
|
7871
|
+
/* @__PURE__ */ jsx43("div", { className: "flex-1 overflow-y-auto", children: todos.length === 0 ? /* @__PURE__ */ jsx43("p", { className: "px-4 py-8 text-xs text-muted-foreground text-center", children: "No todos yet. The agent will create them as it plans work." }) : /* @__PURE__ */ jsx43("div", { className: "py-1", children: todos.map((t) => {
|
|
7872
|
+
const label = t.status === "in_progress" && t.activeForm ? t.activeForm : t.content;
|
|
7873
|
+
const isInProgress = t.status === "in_progress";
|
|
7874
|
+
const isCompleted = t.status === "completed";
|
|
7875
|
+
return /* @__PURE__ */ jsxs38(
|
|
7876
|
+
"div",
|
|
7877
|
+
{
|
|
7878
|
+
className: `px-4 py-2 flex items-start gap-2.5 text-sm border-l-2 group ${isInProgress ? "border-l-yellow-500 bg-yellow-50/40 dark:bg-yellow-950/20" : isCompleted ? "border-l-emerald-500 bg-emerald-50/30 dark:bg-emerald-950/15" : "border-l-transparent"}`,
|
|
7879
|
+
children: [
|
|
7880
|
+
/* @__PURE__ */ jsx43("span", { className: "mt-0.5 shrink-0", children: isCompleted ? /* @__PURE__ */ jsx43(CheckCircle27, { className: "w-3.5 h-3.5 text-emerald-500" }) : isInProgress ? /* @__PURE__ */ jsx43(Clock3, { className: "w-3.5 h-3.5 text-yellow-500 animate-spin" }) : /* @__PURE__ */ jsx43(Circle2, { className: "w-3.5 h-3.5 text-muted-foreground/50" }) }),
|
|
7881
|
+
/* @__PURE__ */ jsx43(
|
|
7882
|
+
"span",
|
|
7883
|
+
{
|
|
7884
|
+
className: `leading-snug flex-1 ${isInProgress ? "text-yellow-800 dark:text-yellow-200 font-medium" : isCompleted ? "text-muted-foreground line-through" : "text-foreground"}`,
|
|
7885
|
+
children: label
|
|
7886
|
+
}
|
|
7887
|
+
),
|
|
7888
|
+
/* @__PURE__ */ jsx43(
|
|
7889
|
+
"button",
|
|
7890
|
+
{
|
|
7891
|
+
type: "button",
|
|
7892
|
+
onClick: (e) => {
|
|
7893
|
+
e.stopPropagation();
|
|
7894
|
+
handleRemove(t.id);
|
|
7895
|
+
},
|
|
7896
|
+
className: "shrink-0 p-0.5 rounded opacity-0 group-hover:opacity-60 hover:opacity-100 hover:bg-muted transition-all",
|
|
7897
|
+
title: "Remove",
|
|
7898
|
+
children: /* @__PURE__ */ jsx43(X8, { className: "w-3 h-3 text-muted-foreground" })
|
|
7899
|
+
}
|
|
7900
|
+
)
|
|
7901
|
+
]
|
|
7902
|
+
},
|
|
7903
|
+
t.id
|
|
7904
|
+
);
|
|
7905
|
+
}) }) })
|
|
7906
|
+
] });
|
|
7907
|
+
}
|
|
7908
|
+
|
|
7833
7909
|
// src/App.tsx
|
|
7834
|
-
import { Fragment as Fragment11, jsx as
|
|
7910
|
+
import { Fragment as Fragment11, jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7835
7911
|
function AppInner() {
|
|
7836
7912
|
const { theme } = useTheme();
|
|
7837
7913
|
const { currentView, sidebarOpen, toggleSidebar, setSearchOpen, setSidebarOpen } = useUIStore();
|
|
@@ -7841,7 +7917,7 @@ function AppInner() {
|
|
|
7841
7917
|
const sessionTitle = useSessionStore((s) => s.session?.title);
|
|
7842
7918
|
const sessionId = useSessionStore((s) => s.session?.id);
|
|
7843
7919
|
const nickname = useUIStore((s) => sessionId ? s.sessionNicknames[sessionId] : void 0);
|
|
7844
|
-
|
|
7920
|
+
useEffect22(() => {
|
|
7845
7921
|
if (typeof window === "undefined") return;
|
|
7846
7922
|
const mq = window.matchMedia("(max-width: 768px)");
|
|
7847
7923
|
const apply = () => {
|
|
@@ -7854,7 +7930,7 @@ function AppInner() {
|
|
|
7854
7930
|
return () => mq.removeEventListener("change", apply);
|
|
7855
7931
|
}, [setSidebarOpen]);
|
|
7856
7932
|
useWebSocketBootstrap();
|
|
7857
|
-
|
|
7933
|
+
useEffect22(() => {
|
|
7858
7934
|
const parts = [];
|
|
7859
7935
|
if (isLoading) {
|
|
7860
7936
|
const it = iteration ? ` iter ${iteration.index}${iteration.max ? `/${iteration.max}` : ""}` : "";
|
|
@@ -7871,7 +7947,7 @@ function AppInner() {
|
|
|
7871
7947
|
document.title = "WrongStack";
|
|
7872
7948
|
};
|
|
7873
7949
|
}, [isLoading, iteration, projectName, sessionTitle, nickname]);
|
|
7874
|
-
|
|
7950
|
+
useEffect22(() => {
|
|
7875
7951
|
const onKey = (e) => {
|
|
7876
7952
|
const t = e.target;
|
|
7877
7953
|
const tag = t?.tagName?.toLowerCase();
|
|
@@ -7967,33 +8043,34 @@ function AppInner() {
|
|
|
7967
8043
|
window.addEventListener("keydown", onKey);
|
|
7968
8044
|
return () => window.removeEventListener("keydown", onKey);
|
|
7969
8045
|
}, [toggleSidebar, setSearchOpen]);
|
|
7970
|
-
return /* @__PURE__ */
|
|
7971
|
-
sidebarOpen && /* @__PURE__ */
|
|
7972
|
-
/* @__PURE__ */
|
|
7973
|
-
/* @__PURE__ */
|
|
7974
|
-
currentView === "chat" && /* @__PURE__ */
|
|
7975
|
-
sessionId && /* @__PURE__ */
|
|
7976
|
-
/* @__PURE__ */
|
|
7977
|
-
/* @__PURE__ */
|
|
8046
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("flex h-screen", theme), children: [
|
|
8047
|
+
sidebarOpen && /* @__PURE__ */ jsx44(Sidebar, {}),
|
|
8048
|
+
/* @__PURE__ */ jsxs39("main", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
8049
|
+
/* @__PURE__ */ jsx44(ConnectionBanner, {}),
|
|
8050
|
+
currentView === "chat" && /* @__PURE__ */ jsxs39(Fragment11, { children: [
|
|
8051
|
+
sessionId && /* @__PURE__ */ jsxs39("div", { className: "px-4 pt-2 space-y-2", children: [
|
|
8052
|
+
/* @__PURE__ */ jsx44(CollabPanel, { sessionId }),
|
|
8053
|
+
/* @__PURE__ */ jsx44(FleetPanel, {}),
|
|
8054
|
+
/* @__PURE__ */ jsx44(TodosPanel, {})
|
|
7978
8055
|
] }),
|
|
7979
|
-
/* @__PURE__ */
|
|
8056
|
+
/* @__PURE__ */ jsx44(ChatView, {})
|
|
7980
8057
|
] }),
|
|
7981
|
-
currentView === "settings" && /* @__PURE__ */
|
|
8058
|
+
currentView === "settings" && /* @__PURE__ */ jsx44(SettingsPanel, {})
|
|
7982
8059
|
] }),
|
|
7983
|
-
/* @__PURE__ */
|
|
7984
|
-
/* @__PURE__ */
|
|
7985
|
-
/* @__PURE__ */
|
|
7986
|
-
/* @__PURE__ */
|
|
7987
|
-
/* @__PURE__ */
|
|
8060
|
+
/* @__PURE__ */ jsx44(ConfirmDialog, {}),
|
|
8061
|
+
/* @__PURE__ */ jsx44(CommandPalette, {}),
|
|
8062
|
+
/* @__PURE__ */ jsx44(ShortcutsOverlay, {}),
|
|
8063
|
+
/* @__PURE__ */ jsx44(QuickModelSwitcher, {}),
|
|
8064
|
+
/* @__PURE__ */ jsx44(Toaster, {})
|
|
7988
8065
|
] });
|
|
7989
8066
|
}
|
|
7990
8067
|
function App() {
|
|
7991
|
-
return /* @__PURE__ */
|
|
8068
|
+
return /* @__PURE__ */ jsx44(ErrorBoundary, { children: /* @__PURE__ */ jsx44(ThemeProvider, { defaultTheme: "system", children: /* @__PURE__ */ jsx44(AppInner, {}) }) });
|
|
7992
8069
|
}
|
|
7993
8070
|
|
|
7994
8071
|
// src/main.tsx
|
|
7995
|
-
import { jsx as
|
|
8072
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
7996
8073
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
7997
|
-
/* @__PURE__ */
|
|
8074
|
+
/* @__PURE__ */ jsx45(React6.StrictMode, { children: /* @__PURE__ */ jsx45(App, {}) })
|
|
7998
8075
|
);
|
|
7999
8076
|
//# sourceMappingURL=index.js.map
|