@wrongstack/webui 0.89.1 → 0.89.3
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-C5BxsMkY.js +94 -0
- package/dist/index.html +1 -1
- package/dist/index.js +22 -81
- package/dist/index.js.map +1 -1
- package/dist/server/entry.js +12 -17
- package/dist/server/entry.js.map +1 -1
- package/dist/server/index.js +12 -17
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/assets/index-D1cZ__pQ.js +0 -94
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/wrongstack.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>WrongStack WebUI</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-C5BxsMkY.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/vendor-CumDpIdV.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/vendor-DW1jimNH.css">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-DB5NTtW7.css">
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/main.tsx
|
|
2
|
+
import { expectDefined as expectDefined13 } from "@wrongstack/core";
|
|
2
3
|
import React6 from "react";
|
|
3
4
|
import ReactDOM from "react-dom/client";
|
|
4
5
|
import "@fontsource-variable/ibm-plex-sans";
|
|
@@ -6,6 +7,9 @@ import "@fontsource/ibm-plex-mono/400.css";
|
|
|
6
7
|
import "@fontsource/ibm-plex-mono/500.css";
|
|
7
8
|
import "@fontsource/ibm-plex-mono/600.css";
|
|
8
9
|
|
|
10
|
+
// src/App.tsx
|
|
11
|
+
import { expectDefined as expectDefined12 } from "@wrongstack/core";
|
|
12
|
+
|
|
9
13
|
// src/lib/favicon.ts
|
|
10
14
|
var BASE_BG = "#4f46e5";
|
|
11
15
|
function buildSvg(status) {
|
|
@@ -471,14 +475,9 @@ function getWSClient(url) {
|
|
|
471
475
|
}
|
|
472
476
|
|
|
473
477
|
// src/stores/chat-store.ts
|
|
478
|
+
import { expectDefined } from "@wrongstack/core";
|
|
474
479
|
import { create } from "zustand";
|
|
475
480
|
import { persist } from "zustand/middleware";
|
|
476
|
-
function expectDefined(value) {
|
|
477
|
-
if (value === null || value === void 0) {
|
|
478
|
-
throw new Error("Expected value to be defined");
|
|
479
|
-
}
|
|
480
|
-
return value;
|
|
481
|
-
}
|
|
482
481
|
function dedupeRepeatedBlocks(text) {
|
|
483
482
|
if (!text) return text;
|
|
484
483
|
const paraSplit = text.split(/\n{2,}/);
|
|
@@ -902,6 +901,9 @@ var useFleetStore = create7()((set) => ({
|
|
|
902
901
|
// src/hooks/useWebSocket.ts
|
|
903
902
|
import { useCallback, useEffect as useEffect2, useRef } from "react";
|
|
904
903
|
|
|
904
|
+
// src/hooks/ws-handlers.ts
|
|
905
|
+
import { expectDefined as expectDefined2 } from "@wrongstack/core";
|
|
906
|
+
|
|
905
907
|
// src/lib/utils.ts
|
|
906
908
|
import { clsx } from "clsx";
|
|
907
909
|
import { twMerge } from "tailwind-merge";
|
|
@@ -1058,12 +1060,6 @@ function notifyIfHidden(title, body, tag) {
|
|
|
1058
1060
|
}
|
|
1059
1061
|
|
|
1060
1062
|
// src/hooks/ws-handlers.ts
|
|
1061
|
-
function expectDefined2(value) {
|
|
1062
|
-
if (value === null || value === void 0) {
|
|
1063
|
-
throw new Error("Expected value to be defined");
|
|
1064
|
-
}
|
|
1065
|
-
return value;
|
|
1066
|
-
}
|
|
1067
1063
|
function handleSessionStart(msg) {
|
|
1068
1064
|
const payload = msg.payload;
|
|
1069
1065
|
const prev = useSessionStore.getState().session?.id;
|
|
@@ -1624,6 +1620,7 @@ function useWebSocket() {
|
|
|
1624
1620
|
import { useEffect as useEffect22 } from "react";
|
|
1625
1621
|
|
|
1626
1622
|
// src/components/ChatView/index.tsx
|
|
1623
|
+
import { expectDefined as expectDefined11 } from "@wrongstack/core";
|
|
1627
1624
|
import {
|
|
1628
1625
|
Activity,
|
|
1629
1626
|
ArrowDown as ArrowDown2,
|
|
@@ -1639,6 +1636,7 @@ import {
|
|
|
1639
1636
|
import { useCallback as useCallback3, useEffect as useEffect13, useRef as useRef9, useState as useState17 } from "react";
|
|
1640
1637
|
|
|
1641
1638
|
// src/components/ChatInput.tsx
|
|
1639
|
+
import { expectDefined as expectDefined5 } from "@wrongstack/core";
|
|
1642
1640
|
import { Pencil, Send, Square } from "lucide-react";
|
|
1643
1641
|
import { useCallback as useCallback2, useEffect as useEffect5, useRef as useRef4, useState as useState3 } from "react";
|
|
1644
1642
|
|
|
@@ -2105,15 +2103,10 @@ function renderGroupedList(filtered, index, dispatch, setIndex) {
|
|
|
2105
2103
|
}
|
|
2106
2104
|
|
|
2107
2105
|
// src/components/FilePicker.tsx
|
|
2106
|
+
import { expectDefined as expectDefined3 } from "@wrongstack/core";
|
|
2108
2107
|
import { FileText, Folder } from "lucide-react";
|
|
2109
2108
|
import { useEffect as useEffect4, useRef as useRef3, useState as useState2 } from "react";
|
|
2110
2109
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2111
|
-
function expectDefined3(value) {
|
|
2112
|
-
if (value === null || value === void 0) {
|
|
2113
|
-
throw new Error("Expected value to be defined");
|
|
2114
|
-
}
|
|
2115
|
-
return value;
|
|
2116
|
-
}
|
|
2117
2110
|
function FilePicker({ query, onPick, onClose }) {
|
|
2118
2111
|
const ws = useWebSocket();
|
|
2119
2112
|
const wsUrl = useConfigStore((s) => s.wsUrl);
|
|
@@ -2228,12 +2221,7 @@ var Button = React.forwardRef(
|
|
|
2228
2221
|
Button.displayName = "Button";
|
|
2229
2222
|
|
|
2230
2223
|
// src/components/ChatInput/slash-commands.ts
|
|
2231
|
-
|
|
2232
|
-
if (value === null || value === void 0) {
|
|
2233
|
-
throw new Error("Expected value to be defined");
|
|
2234
|
-
}
|
|
2235
|
-
return value;
|
|
2236
|
-
}
|
|
2224
|
+
import { expectDefined as expectDefined4 } from "@wrongstack/core";
|
|
2237
2225
|
var SLASH_COMMANDS = [
|
|
2238
2226
|
// Run
|
|
2239
2227
|
{ name: "/abort", category: "Run", aliases: ["/stop"], description: "Abort the current run" },
|
|
@@ -2249,7 +2237,7 @@ var SLASH_COMMANDS = [
|
|
|
2249
2237
|
// Inspect
|
|
2250
2238
|
{ name: "/debug", category: "Inspect", aliases: ["/context"], description: "Per-section context size breakdown" },
|
|
2251
2239
|
{ name: "/tools", category: "Inspect", description: "List every registered tool the model can call" },
|
|
2252
|
-
{ name: "/memory", category: "Inspect", description: "
|
|
2240
|
+
{ name: "/memory", category: "Inspect", description: "Manage memory: show, remember, forget, clear, compact, stats" },
|
|
2253
2241
|
{ name: "/skill", category: "Inspect", aliases: ["/skills"], description: "List active skills" },
|
|
2254
2242
|
{ name: "/diag", category: "Inspect", description: "Runtime diagnostics (provider, tools, features, mode, usage)" },
|
|
2255
2243
|
{ name: "/stats", category: "Inspect", description: "Session stats: tokens, cache hit ratio, cost, elapsed" },
|
|
@@ -2312,12 +2300,6 @@ function detectAtMention(value, cursor) {
|
|
|
2312
2300
|
|
|
2313
2301
|
// src/components/ChatInput.tsx
|
|
2314
2302
|
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2315
|
-
function expectDefined5(value) {
|
|
2316
|
-
if (value === null || value === void 0) {
|
|
2317
|
-
throw new Error("Expected value to be defined");
|
|
2318
|
-
}
|
|
2319
|
-
return value;
|
|
2320
|
-
}
|
|
2321
2303
|
function ChatInput() {
|
|
2322
2304
|
const { isLoading, setLoading, addMessage, clearMessages } = useChatStore();
|
|
2323
2305
|
const queue = useChatStore((s) => s.queue);
|
|
@@ -3010,15 +2992,10 @@ function ConnectionChip({ wsStatus, wsConnected }) {
|
|
|
3010
2992
|
}
|
|
3011
2993
|
|
|
3012
2994
|
// src/components/ContextModePicker.tsx
|
|
2995
|
+
import { expectDefined as expectDefined6 } from "@wrongstack/core";
|
|
3013
2996
|
import { Check, ChevronDown, Gauge } from "lucide-react";
|
|
3014
2997
|
import { useEffect as useEffect7, useRef as useRef5, useState as useState5 } from "react";
|
|
3015
2998
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3016
|
-
function expectDefined6(value) {
|
|
3017
|
-
if (value === null || value === void 0) {
|
|
3018
|
-
throw new Error("Expected value to be defined");
|
|
3019
|
-
}
|
|
3020
|
-
return value;
|
|
3021
|
-
}
|
|
3022
2999
|
var FALLBACK_MODES = [
|
|
3023
3000
|
{
|
|
3024
3001
|
id: "balanced",
|
|
@@ -3254,6 +3231,9 @@ function CostChip() {
|
|
|
3254
3231
|
] });
|
|
3255
3232
|
}
|
|
3256
3233
|
|
|
3234
|
+
// src/components/MessageBubble/index.tsx
|
|
3235
|
+
import { expectDefined as expectDefined9 } from "@wrongstack/core";
|
|
3236
|
+
|
|
3257
3237
|
// src/lib/tool-summary.ts
|
|
3258
3238
|
var FALLBACK_HEAD_FIELDS = [
|
|
3259
3239
|
"path",
|
|
@@ -3389,14 +3369,9 @@ import ReactMarkdown from "react-markdown";
|
|
|
3389
3369
|
import remarkGfm from "remark-gfm";
|
|
3390
3370
|
|
|
3391
3371
|
// src/components/DiffView.tsx
|
|
3372
|
+
import { expectDefined as expectDefined7 } from "@wrongstack/core";
|
|
3392
3373
|
import { memo, useMemo as useMemo2 } from "react";
|
|
3393
3374
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3394
|
-
function expectDefined7(value) {
|
|
3395
|
-
if (value === null || value === void 0) {
|
|
3396
|
-
throw new Error("Expected value to be defined");
|
|
3397
|
-
}
|
|
3398
|
-
return value;
|
|
3399
|
-
}
|
|
3400
3375
|
var DiffView = memo(function DiffView2({ oldText, newText, caption }) {
|
|
3401
3376
|
const rows = useMemo2(() => computeDiff(oldText, newText), [oldText, newText]);
|
|
3402
3377
|
if (rows === null) {
|
|
@@ -3852,14 +3827,9 @@ function CopyButton({
|
|
|
3852
3827
|
}
|
|
3853
3828
|
|
|
3854
3829
|
// src/components/MessageBubble/ErrorBody.tsx
|
|
3830
|
+
import { expectDefined as expectDefined8 } from "@wrongstack/core";
|
|
3855
3831
|
import { useState as useState9 } from "react";
|
|
3856
3832
|
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3857
|
-
function expectDefined8(value) {
|
|
3858
|
-
if (value === null || value === void 0) {
|
|
3859
|
-
throw new Error("Expected value to be defined");
|
|
3860
|
-
}
|
|
3861
|
-
return value;
|
|
3862
|
-
}
|
|
3863
3833
|
function detectStackBoundary(text) {
|
|
3864
3834
|
const lines = text.split("\n");
|
|
3865
3835
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -3966,12 +3936,6 @@ function ToolInputView({ input }) {
|
|
|
3966
3936
|
|
|
3967
3937
|
// src/components/MessageBubble/index.tsx
|
|
3968
3938
|
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3969
|
-
function expectDefined9(value) {
|
|
3970
|
-
if (value === null || value === void 0) {
|
|
3971
|
-
throw new Error("Expected value to be defined");
|
|
3972
|
-
}
|
|
3973
|
-
return value;
|
|
3974
|
-
}
|
|
3975
3939
|
var MessageBubble = memo3(function MessageBubble2({
|
|
3976
3940
|
message,
|
|
3977
3941
|
isFirst = false,
|
|
@@ -4570,15 +4534,10 @@ function ThemeToggle({ className }) {
|
|
|
4570
4534
|
}
|
|
4571
4535
|
|
|
4572
4536
|
// src/components/ToolGroup.tsx
|
|
4537
|
+
import { expectDefined as expectDefined10 } from "@wrongstack/core";
|
|
4573
4538
|
import { CheckCircle2 as CheckCircle23, ChevronDown as ChevronDown5, ChevronRight as ChevronRight3, Loader2 as Loader22, Terminal as Terminal2, XCircle as XCircle3 } from "lucide-react";
|
|
4574
4539
|
import { memo as memo4, useState as useState15 } from "react";
|
|
4575
4540
|
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4576
|
-
function expectDefined10(value) {
|
|
4577
|
-
if (value === null || value === void 0) {
|
|
4578
|
-
throw new Error("Expected value to be defined");
|
|
4579
|
-
}
|
|
4580
|
-
return value;
|
|
4581
|
-
}
|
|
4582
4541
|
function formatDuration(ms) {
|
|
4583
4542
|
if (ms < 1e3) return `${ms}ms`;
|
|
4584
4543
|
if (ms < 6e4) return `${(ms / 1e3).toFixed(ms < 1e4 ? 2 : 1)}s`;
|
|
@@ -4966,12 +4925,6 @@ function ThinkingBubble() {
|
|
|
4966
4925
|
|
|
4967
4926
|
// src/components/ChatView/index.tsx
|
|
4968
4927
|
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4969
|
-
function expectDefined11(value) {
|
|
4970
|
-
if (value === null || value === void 0) {
|
|
4971
|
-
throw new Error("Expected value to be defined");
|
|
4972
|
-
}
|
|
4973
|
-
return value;
|
|
4974
|
-
}
|
|
4975
4928
|
function ChatView() {
|
|
4976
4929
|
const { messages, isLoading } = useChatStore();
|
|
4977
4930
|
const setPaletteOpen = useUIStore((s) => s.setPaletteOpen);
|
|
@@ -5061,7 +5014,7 @@ function ChatView() {
|
|
|
5061
5014
|
})();
|
|
5062
5015
|
const stateTone = agentState === "idle" ? "bg-muted text-muted-foreground" : agentState === "streaming" ? "bg-blue-500/10 text-blue-600 dark:text-blue-400" : "bg-amber-500/10 text-amber-600 dark:text-amber-400";
|
|
5063
5016
|
const hasStatusContent = maxContext > 0 && lastInputTokens > 0 || totalTokens.input > 0 || !!startTime;
|
|
5064
|
-
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col h-
|
|
5017
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
5065
5018
|
/* @__PURE__ */ jsxs21("header", { className: "flex flex-col border-b bg-card shrink-0", children: [
|
|
5066
5019
|
/* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between gap-2 px-3 py-2", children: [
|
|
5067
5020
|
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1.5 min-w-0 flex-1", children: [
|
|
@@ -7947,7 +7900,7 @@ function TodosPanel() {
|
|
|
7947
7900
|
const pending = todos.filter((t) => t.status === "pending");
|
|
7948
7901
|
const inProgress = todos.filter((t) => t.status === "in_progress");
|
|
7949
7902
|
const completed = todos.filter((t) => t.status === "completed");
|
|
7950
|
-
return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col
|
|
7903
|
+
return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col bg-background", children: [
|
|
7951
7904
|
/* @__PURE__ */ jsxs38("div", { className: "px-4 py-3 border-b border-border flex items-center justify-between shrink-0", children: [
|
|
7952
7905
|
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
7953
7906
|
/* @__PURE__ */ jsx43("h2", { className: "text-sm font-semibold text-foreground", children: "TODOS" }),
|
|
@@ -8012,12 +7965,6 @@ function TodosPanel() {
|
|
|
8012
7965
|
|
|
8013
7966
|
// src/App.tsx
|
|
8014
7967
|
import { Fragment as Fragment11, jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8015
|
-
function expectDefined12(value) {
|
|
8016
|
-
if (value === null || value === void 0) {
|
|
8017
|
-
throw new Error("Expected value to be defined");
|
|
8018
|
-
}
|
|
8019
|
-
return value;
|
|
8020
|
-
}
|
|
8021
7968
|
function AppInner() {
|
|
8022
7969
|
const { theme } = useTheme();
|
|
8023
7970
|
const { currentView, sidebarOpen, toggleSidebar, setSearchOpen, setSidebarOpen } = useUIStore();
|
|
@@ -8180,12 +8127,6 @@ function App() {
|
|
|
8180
8127
|
|
|
8181
8128
|
// src/main.tsx
|
|
8182
8129
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
8183
|
-
function expectDefined13(value) {
|
|
8184
|
-
if (value === null || value === void 0) {
|
|
8185
|
-
throw new Error("Expected value to be defined");
|
|
8186
|
-
}
|
|
8187
|
-
return value;
|
|
8188
|
-
}
|
|
8189
8130
|
ReactDOM.createRoot(expectDefined13(document.getElementById("root"))).render(
|
|
8190
8131
|
/* @__PURE__ */ jsx45(React6.StrictMode, { children: /* @__PURE__ */ jsx45(App, {}) })
|
|
8191
8132
|
);
|