@alivault/pico 0.10.3 → 0.12.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/.output/nitro.json +1 -1
- package/.output/public/assets/{index-DZbiiE6N.js → index-DQLwecED.js} +8 -8
- package/.output/public/assets/routes-DynLhCvj.js +2195 -0
- package/.output/public/assets/styles-DJ9ubgcc.css +2 -0
- package/.output/server/_libs/lucide-react.mjs +27 -1
- package/.output/server/_ssr/{router-qUSM3V8V.mjs → router-D36lUq7O.mjs} +169 -9
- package/.output/server/_ssr/{routes-DMdIR42g.mjs → routes-9nZumcXQ.mjs} +55 -15
- package/.output/server/_ssr/{routes-Ia1sMc23.mjs → routes-C8qT6Oju.mjs} +598 -108
- package/.output/server/_ssr/ssr.mjs +2 -2
- package/.output/server/{_tanstack-start-manifest_v-PFy5bdx9.mjs → _tanstack-start-manifest_v-Cd2ypHmK.mjs} +4 -4
- package/.output/server/index.mjs +497 -497
- package/package.json +1 -1
- package/.output/public/assets/routes-Cov4KirM.js +0 -2195
- package/.output/public/assets/styles-hk0oLlcJ.css +0 -2
|
@@ -521,6 +521,10 @@ var Minimize2 = createLucideIcon("minimize-2", [
|
|
|
521
521
|
key: "rmj7iw"
|
|
522
522
|
}]
|
|
523
523
|
]);
|
|
524
|
+
var Minus = createLucideIcon("minus", [["path", {
|
|
525
|
+
d: "M5 12h14",
|
|
526
|
+
key: "1ays0h"
|
|
527
|
+
}]]);
|
|
524
528
|
var OctagonX = createLucideIcon("octagon-x", [
|
|
525
529
|
["path", {
|
|
526
530
|
d: "m15 9-6 6",
|
|
@@ -663,6 +667,28 @@ var Tag = createLucideIcon("tag", [["path", {
|
|
|
663
667
|
fill: "currentColor",
|
|
664
668
|
key: "kqv944"
|
|
665
669
|
}]]);
|
|
670
|
+
var Trash2 = createLucideIcon("trash-2", [
|
|
671
|
+
["path", {
|
|
672
|
+
d: "M10 11v6",
|
|
673
|
+
key: "nco0om"
|
|
674
|
+
}],
|
|
675
|
+
["path", {
|
|
676
|
+
d: "M14 11v6",
|
|
677
|
+
key: "outv1u"
|
|
678
|
+
}],
|
|
679
|
+
["path", {
|
|
680
|
+
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
|
|
681
|
+
key: "miytrc"
|
|
682
|
+
}],
|
|
683
|
+
["path", {
|
|
684
|
+
d: "M3 6h18",
|
|
685
|
+
key: "d0wm0j"
|
|
686
|
+
}],
|
|
687
|
+
["path", {
|
|
688
|
+
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
689
|
+
key: "e791ji"
|
|
690
|
+
}]
|
|
691
|
+
]);
|
|
666
692
|
var TriangleAlert = createLucideIcon("triangle-alert", [
|
|
667
693
|
["path", {
|
|
668
694
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
@@ -740,4 +766,4 @@ var X = createLucideIcon("x", [["path", {
|
|
|
740
766
|
key: "d8bk6v"
|
|
741
767
|
}]]);
|
|
742
768
|
//#endregion
|
|
743
|
-
export {
|
|
769
|
+
export { FolderPlus as A, ChevronsDownUp as B, ListEnd as C, GitBranch as D, GitPullRequestArrow as E, Download as F, ArrowUp as G, ChevronRight as H, Copy as I, ArrowRight as J, ArrowUpToLine as K, Command as L, ExternalLink as M, Ellipsis as N, GitCommitHorizontal as O, EllipsisVertical as P, CircleCheck as R, ListStart as S, ImagePlus as T, ChevronDown as U, ChevronUp as V, Check as W, ArrowDown as X, ArrowLeft as Y, ArrowBigUp as Z, Option as _, TriangleAlert as a, Minimize2 as b, Square as c, Search as d, Plus as f, PanelLeftClose as g, PanelLeftOpen as h, Undo2 as i, FileDiff as j, Folder as k, SquarePen as l, PanelLeft as m, WandSparkles as n, Trash2 as o, PanelRight as p, ArrowUpRight as q, Upload as r, Tag as s, X as t, Settings2 as u, OctagonX as v, Info as w, Maximize2 as x, Minus as y, ChevronsUpDown as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { $ as require_react, Q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
3
|
import { a as createRouter, c as createRootRoute, n as Scripts, r as HeadContent, s as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { B as createCompactionSummaryItem, G as extractToolText, I as appliedThemeClassColorMode, J as mergeAssistantBlocksForStreaming, L as assistantBlocksFromMessage, M as TooltipProvider, R as buildItemsFromSync, T as Spinner, U as extractMessageImages, W as extractMessageText$1, f as PICO_SHIKI_VARIABLE_DEFAULTS, kt as toolCategoryFromTool, n as APPLIED_THEME_STORAGE_KEY, t as APPLIED_THEME_CLASSES, u as PICO_CODE_SHIKI_THEME, x as Route$54 } from "./routes-
|
|
4
|
+
import { R as CircleCheck, a as TriangleAlert, v as OctagonX, w as Info } from "../_libs/lucide-react.mjs";
|
|
5
|
+
import { B as createCompactionSummaryItem, G as extractToolText, I as appliedThemeClassColorMode, J as mergeAssistantBlocksForStreaming, L as assistantBlocksFromMessage, M as TooltipProvider, R as buildItemsFromSync, T as Spinner, U as extractMessageImages, W as extractMessageText$1, f as PICO_SHIKI_VARIABLE_DEFAULTS, kt as toolCategoryFromTool, n as APPLIED_THEME_STORAGE_KEY, t as APPLIED_THEME_CLASSES, u as PICO_CODE_SHIKI_THEME, x as Route$54 } from "./routes-9nZumcXQ.mjs";
|
|
6
6
|
import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
|
|
7
7
|
import { t as setupRouterSsrQueryIntegration } from "../_libs/@tanstack/react-router-ssr-query+[...].mjs";
|
|
8
8
|
import { n as HotkeysProvider } from "../_libs/tanstack__react-hotkeys.mjs";
|
|
@@ -20,7 +20,7 @@ import os, { homedir } from "node:os";
|
|
|
20
20
|
import { performance } from "node:perf_hooks";
|
|
21
21
|
import { isMainThread } from "node:worker_threads";
|
|
22
22
|
import { execSync, spawn } from "node:child_process";
|
|
23
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/router-
|
|
23
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-D36lUq7O.js
|
|
24
24
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
25
25
|
var import_jsx_runtime = require_jsx_runtime();
|
|
26
26
|
function sonnerThemeFromAppliedTheme(theme) {
|
|
@@ -37,7 +37,7 @@ var Toaster$1 = ({ ...props }) => {
|
|
|
37
37
|
info: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { className: "size-4" }),
|
|
38
38
|
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlert, { className: "size-4" }),
|
|
39
39
|
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OctagonX, { className: "size-4" }),
|
|
40
|
-
loading: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {
|
|
40
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, { size: "md" })
|
|
41
41
|
},
|
|
42
42
|
style: {
|
|
43
43
|
"--normal-bg": "var(--popover)",
|
|
@@ -87,7 +87,7 @@ function AppProviders({ children }) {
|
|
|
87
87
|
})
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
var styles_default = "/assets/styles-
|
|
90
|
+
var styles_default = "/assets/styles-DJ9ubgcc.css";
|
|
91
91
|
var TANSTACK_DEVTOOLS_SETTINGS_KEY = "tanstack_devtools_settings";
|
|
92
92
|
var TANSTACK_DEVTOOLS_DEFAULTS_STORAGE_KEY = "pico-tanstack-devtools-defaults-v1";
|
|
93
93
|
var TANSTACK_DEVTOOLS_CONFIG = {
|
|
@@ -2420,6 +2420,162 @@ async function readDirectoryGitChanges(cwd, { force = false } = {}) {
|
|
|
2420
2420
|
function uniqueGitActionPaths(paths) {
|
|
2421
2421
|
return Array.from(new Set(paths.filter((path) => Boolean(path))));
|
|
2422
2422
|
}
|
|
2423
|
+
async function gitRepositoryHasHead(cwd) {
|
|
2424
|
+
return (await runCommand("git", [
|
|
2425
|
+
"rev-parse",
|
|
2426
|
+
"--verify",
|
|
2427
|
+
"HEAD"
|
|
2428
|
+
], {
|
|
2429
|
+
cwd,
|
|
2430
|
+
timeoutMs: GIT_REPOSITORY_CHECK_TIMEOUT_MS
|
|
2431
|
+
})).code === 0;
|
|
2432
|
+
}
|
|
2433
|
+
function combineGitActionResults(results) {
|
|
2434
|
+
return {
|
|
2435
|
+
stdout: results.map((result) => result.stdout).filter(Boolean).join("\n"),
|
|
2436
|
+
stderr: results.map((result) => result.stderr).filter(Boolean).join("\n")
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
async function stageDirectoryGitAll(cwd) {
|
|
2440
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2441
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2442
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2443
|
+
const result = await runCommand("git", [
|
|
2444
|
+
"add",
|
|
2445
|
+
"-A",
|
|
2446
|
+
"--",
|
|
2447
|
+
":/"
|
|
2448
|
+
], {
|
|
2449
|
+
cwd: normalizedCwd,
|
|
2450
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2451
|
+
});
|
|
2452
|
+
if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to stage changes", result));
|
|
2453
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2454
|
+
return {
|
|
2455
|
+
stdout: result.stdout,
|
|
2456
|
+
stderr: result.stderr
|
|
2457
|
+
};
|
|
2458
|
+
}
|
|
2459
|
+
async function unstageDirectoryGitAll(cwd) {
|
|
2460
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2461
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2462
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2463
|
+
const result = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2464
|
+
"restore",
|
|
2465
|
+
"--staged",
|
|
2466
|
+
"--",
|
|
2467
|
+
":/"
|
|
2468
|
+
], {
|
|
2469
|
+
cwd: normalizedCwd,
|
|
2470
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2471
|
+
}) : await runCommand("git", [
|
|
2472
|
+
"rm",
|
|
2473
|
+
"-r",
|
|
2474
|
+
"--cached",
|
|
2475
|
+
"--ignore-unmatch",
|
|
2476
|
+
"--",
|
|
2477
|
+
":/"
|
|
2478
|
+
], {
|
|
2479
|
+
cwd: normalizedCwd,
|
|
2480
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2481
|
+
});
|
|
2482
|
+
if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to unstage changes", result));
|
|
2483
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2484
|
+
return {
|
|
2485
|
+
stdout: result.stdout,
|
|
2486
|
+
stderr: result.stderr
|
|
2487
|
+
};
|
|
2488
|
+
}
|
|
2489
|
+
async function discardDirectoryGitAll(cwd) {
|
|
2490
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2491
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2492
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2493
|
+
const restoreResult = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2494
|
+
"restore",
|
|
2495
|
+
"--source=HEAD",
|
|
2496
|
+
"--staged",
|
|
2497
|
+
"--worktree",
|
|
2498
|
+
"--",
|
|
2499
|
+
":/"
|
|
2500
|
+
], {
|
|
2501
|
+
cwd: normalizedCwd,
|
|
2502
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2503
|
+
}) : await runCommand("git", [
|
|
2504
|
+
"rm",
|
|
2505
|
+
"-r",
|
|
2506
|
+
"--cached",
|
|
2507
|
+
"--ignore-unmatch",
|
|
2508
|
+
"--",
|
|
2509
|
+
":/"
|
|
2510
|
+
], {
|
|
2511
|
+
cwd: normalizedCwd,
|
|
2512
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2513
|
+
});
|
|
2514
|
+
if (restoreResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to discard changes", restoreResult));
|
|
2515
|
+
const cleanResult = await runCommand("git", [
|
|
2516
|
+
"clean",
|
|
2517
|
+
"-fd",
|
|
2518
|
+
"--",
|
|
2519
|
+
":/"
|
|
2520
|
+
], {
|
|
2521
|
+
cwd: normalizedCwd,
|
|
2522
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2523
|
+
});
|
|
2524
|
+
if (cleanResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to discard changes", cleanResult));
|
|
2525
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2526
|
+
return combineGitActionResults([{
|
|
2527
|
+
stdout: restoreResult.stdout,
|
|
2528
|
+
stderr: restoreResult.stderr
|
|
2529
|
+
}, {
|
|
2530
|
+
stdout: cleanResult.stdout,
|
|
2531
|
+
stderr: cleanResult.stderr
|
|
2532
|
+
}]);
|
|
2533
|
+
}
|
|
2534
|
+
async function nukeDirectoryGitWorkingTree(cwd) {
|
|
2535
|
+
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2536
|
+
if (!normalizedCwd) throw new Error("cwd is required");
|
|
2537
|
+
if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
|
|
2538
|
+
const restoreResult = await gitRepositoryHasHead(normalizedCwd) ? await runCommand("git", [
|
|
2539
|
+
"restore",
|
|
2540
|
+
"--source=HEAD",
|
|
2541
|
+
"--staged",
|
|
2542
|
+
"--worktree",
|
|
2543
|
+
"--",
|
|
2544
|
+
":/"
|
|
2545
|
+
], {
|
|
2546
|
+
cwd: normalizedCwd,
|
|
2547
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2548
|
+
}) : await runCommand("git", [
|
|
2549
|
+
"rm",
|
|
2550
|
+
"-r",
|
|
2551
|
+
"--cached",
|
|
2552
|
+
"--ignore-unmatch",
|
|
2553
|
+
"--",
|
|
2554
|
+
":/"
|
|
2555
|
+
], {
|
|
2556
|
+
cwd: normalizedCwd,
|
|
2557
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2558
|
+
});
|
|
2559
|
+
if (restoreResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to nuke working tree", restoreResult));
|
|
2560
|
+
const cleanResult = await runCommand("git", [
|
|
2561
|
+
"clean",
|
|
2562
|
+
"-fdx",
|
|
2563
|
+
"--",
|
|
2564
|
+
":/"
|
|
2565
|
+
], {
|
|
2566
|
+
cwd: normalizedCwd,
|
|
2567
|
+
timeoutMs: GIT_ACTION_TIMEOUT_MS
|
|
2568
|
+
});
|
|
2569
|
+
if (cleanResult.code !== 0) throw new Error(gitCommandErrorMessage("Failed to nuke working tree", cleanResult));
|
|
2570
|
+
invalidateDirectoryGitCaches(normalizedCwd);
|
|
2571
|
+
return combineGitActionResults([{
|
|
2572
|
+
stdout: restoreResult.stdout,
|
|
2573
|
+
stderr: restoreResult.stderr
|
|
2574
|
+
}, {
|
|
2575
|
+
stdout: cleanResult.stdout,
|
|
2576
|
+
stderr: cleanResult.stderr
|
|
2577
|
+
}]);
|
|
2578
|
+
}
|
|
2423
2579
|
async function stageDirectoryGitFile(cwd, path, previousPath) {
|
|
2424
2580
|
const normalizedCwd = normalizeGitCwd(cwd);
|
|
2425
2581
|
const normalizedPath = assertGitFilePath(path);
|
|
@@ -7232,14 +7388,16 @@ var Route$44 = createFileRoute("/api/git-status")({ server: { handlers: { GET: a
|
|
|
7232
7388
|
var Route$43 = createFileRoute("/api/git-stage")({ server: { handlers: { POST: async ({ request }) => {
|
|
7233
7389
|
try {
|
|
7234
7390
|
const body = await readRequestJson(request);
|
|
7391
|
+
const action = typeof body.action === "string" ? body.action : "";
|
|
7392
|
+
const all = body.all === true;
|
|
7235
7393
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
7236
7394
|
const path = typeof body.path === "string" ? body.path : "";
|
|
7237
7395
|
const previousPath = typeof body.previousPath === "string" ? body.previousPath : "";
|
|
7238
7396
|
if (!requestedCwd.trim()) throw new Error("cwd is required");
|
|
7239
|
-
if (!path.trim()) throw new Error("file path is required");
|
|
7397
|
+
if (!path.trim() && !all && action !== "stage-all" && action !== "unstage-all") throw new Error("file path is required");
|
|
7240
7398
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
7241
7399
|
const cwd = await resolveDirectoryPath(requestedCwd, getPicoRuntime().getBaseCwd(activeEntry, context));
|
|
7242
|
-
const result = await stageDirectoryGitFile(cwd, path, previousPath || void 0);
|
|
7400
|
+
const result = action === "unstage-all" ? await unstageDirectoryGitAll(cwd) : all || action === "stage-all" ? await stageDirectoryGitAll(cwd) : await stageDirectoryGitFile(cwd, path, previousPath || void 0);
|
|
7243
7401
|
return jsonResponse({
|
|
7244
7402
|
ok: true,
|
|
7245
7403
|
cwd,
|
|
@@ -7313,15 +7471,17 @@ var Route$40 = createFileRoute("/api/git-pull")({ server: { handlers: { POST: as
|
|
|
7313
7471
|
var Route$39 = createFileRoute("/api/git-discard")({ server: { handlers: { POST: async ({ request }) => {
|
|
7314
7472
|
try {
|
|
7315
7473
|
const body = await readRequestJson(request);
|
|
7474
|
+
const action = typeof body.action === "string" ? body.action : "";
|
|
7475
|
+
const all = body.all === true;
|
|
7316
7476
|
const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
|
|
7317
7477
|
const path = typeof body.path === "string" ? body.path : "";
|
|
7318
7478
|
const previousPath = typeof body.previousPath === "string" ? body.previousPath : "";
|
|
7319
7479
|
const status = typeof body.status === "string" ? body.status : "";
|
|
7320
7480
|
if (!requestedCwd.trim()) throw new Error("cwd is required");
|
|
7321
|
-
if (!path.trim()) throw new Error("file path is required");
|
|
7481
|
+
if (!path.trim() && !all && action !== "discard-all" && action !== "nuke-working-tree") throw new Error("file path is required");
|
|
7322
7482
|
const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
|
|
7323
7483
|
const cwd = await resolveDirectoryPath(requestedCwd, getPicoRuntime().getBaseCwd(activeEntry, context));
|
|
7324
|
-
const result = await discardDirectoryGitFile(cwd, path, previousPath || void 0, status || void 0);
|
|
7484
|
+
const result = action === "nuke-working-tree" ? await nukeDirectoryGitWorkingTree(cwd) : all || action === "discard-all" ? await discardDirectoryGitAll(cwd) : await discardDirectoryGitFile(cwd, path, previousPath || void 0, status || void 0);
|
|
7325
7485
|
return jsonResponse({
|
|
7326
7486
|
ok: true,
|
|
7327
7487
|
cwd,
|
|
@@ -3,9 +3,9 @@ import { $ as require_react, G as TooltipPositioner, J as TooltipRoot, K as Tool
|
|
|
3
3
|
import { o as lazyRouteComponent, s as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
4
|
import { n as clsx } from "../_libs/class-variance-authority+clsx.mjs";
|
|
5
5
|
import { t as twMerge } from "../_libs/tailwind-merge.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { G as ArrowUp, J as ArrowRight, L as Command, V as ChevronUp, X as ArrowDown, Y as ArrowLeft, Z as ArrowBigUp, _ as Option } from "../_libs/lucide-react.mjs";
|
|
7
7
|
import { n as string, t as object } from "../_libs/zod.mjs";
|
|
8
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
8
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-9nZumcXQ.js
|
|
9
9
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
10
10
|
var import_jsx_runtime = require_jsx_runtime();
|
|
11
11
|
function cn(...inputs) {
|
|
@@ -222,15 +222,56 @@ function TitleTooltip({ title, children, kbd, rows, side, align, sideOffset, cla
|
|
|
222
222
|
}) : null] })
|
|
223
223
|
})] });
|
|
224
224
|
}
|
|
225
|
-
|
|
225
|
+
var SPINNER_CELLS = [
|
|
226
|
+
{
|
|
227
|
+
id: "top-left",
|
|
228
|
+
className: "pico-spinner-pixel-0"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: "top",
|
|
232
|
+
className: "pico-spinner-pixel-1"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: "top-right",
|
|
236
|
+
className: "pico-spinner-pixel-2"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: "right",
|
|
240
|
+
className: "pico-spinner-pixel-5"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
id: "bottom-right",
|
|
244
|
+
className: "pico-spinner-pixel-8"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "bottom",
|
|
248
|
+
className: "pico-spinner-pixel-7"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: "bottom-left",
|
|
252
|
+
className: "pico-spinner-pixel-6"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: "left",
|
|
256
|
+
className: "pico-spinner-pixel-3"
|
|
257
|
+
}
|
|
258
|
+
];
|
|
259
|
+
var SPINNER_SIZE_CLASS_NAMES = {
|
|
260
|
+
xs: "size-3",
|
|
261
|
+
sm: "size-3.5",
|
|
262
|
+
md: "size-4"
|
|
263
|
+
};
|
|
264
|
+
function Spinner({ className, size = "sm", "aria-label": ariaLabel = "Loading", ...props }) {
|
|
226
265
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
227
266
|
role: "status",
|
|
228
267
|
"aria-label": ariaLabel,
|
|
229
|
-
|
|
268
|
+
"data-pico-spinner-size": size,
|
|
269
|
+
className: cn("pico-spinner pointer-events-none inline-flex shrink-0 items-center justify-center font-mono leading-none text-primary select-none", SPINNER_SIZE_CLASS_NAMES[size], className),
|
|
230
270
|
...props,
|
|
231
271
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
232
272
|
"aria-hidden": "true",
|
|
233
|
-
className: "pico-spinner-
|
|
273
|
+
className: "pico-spinner-pixels",
|
|
274
|
+
children: SPINNER_CELLS.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cn("pico-spinner-pixel", cell.className) }, cell.id))
|
|
234
275
|
})
|
|
235
276
|
});
|
|
236
277
|
}
|
|
@@ -3021,20 +3062,19 @@ function buildItemsFromSync(sync, previousItems = []) {
|
|
|
3021
3062
|
}
|
|
3022
3063
|
const previousStreamingItem = findStreamingAssistantItem(previousItems);
|
|
3023
3064
|
const shouldRenderStreaming = typeof sync.streaming === "boolean" ? sync.streaming : sync.streamingMessage != null ? true : Boolean(previousStreamingItem);
|
|
3024
|
-
if (shouldRenderStreaming) for (let index = items.length - 1; index >= 0; index -= 1) {
|
|
3025
|
-
const item = items[index];
|
|
3026
|
-
if (item?.kind !== "assistant") continue;
|
|
3027
|
-
items[index] = {
|
|
3028
|
-
...item,
|
|
3029
|
-
done: false
|
|
3030
|
-
};
|
|
3031
|
-
break;
|
|
3032
|
-
}
|
|
3033
3065
|
const pendingItems = mergePendingItemsForSync({
|
|
3034
3066
|
previousItems,
|
|
3035
3067
|
committedItems: items,
|
|
3036
3068
|
preserveOptimisticItems: Boolean(sync.draft) || shouldRenderStreaming
|
|
3037
3069
|
});
|
|
3070
|
+
if (shouldRenderStreaming && pendingItems.length === 0) {
|
|
3071
|
+
const lastItemIndex = items.length - 1;
|
|
3072
|
+
const lastItem = items[lastItemIndex];
|
|
3073
|
+
if (lastItem?.kind === "assistant") items[lastItemIndex] = {
|
|
3074
|
+
...lastItem,
|
|
3075
|
+
done: false
|
|
3076
|
+
};
|
|
3077
|
+
}
|
|
3038
3078
|
items.push(...pendingItems);
|
|
3039
3079
|
if (shouldRenderStreaming) if (sync.streamingMessage?.role === "assistant") {
|
|
3040
3080
|
const renderKey = streamingAssistantRenderKey({
|
|
@@ -3200,7 +3240,7 @@ function getSessionTitle(summary) {
|
|
|
3200
3240
|
if (summary?.name?.trim()) return summary.name.trim();
|
|
3201
3241
|
return "New session";
|
|
3202
3242
|
}
|
|
3203
|
-
var $$splitComponentImporter = () => import("./routes-
|
|
3243
|
+
var $$splitComponentImporter = () => import("./routes-C8qT6Oju.mjs");
|
|
3204
3244
|
var indexSearchSchema = object({ session: string().optional() });
|
|
3205
3245
|
var Route = createFileRoute("/")({
|
|
3206
3246
|
validateSearch: indexSearchSchema,
|