@alivault/pico 0.6.1 → 0.7.1

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.
@@ -1,8 +1,8 @@
1
1
  import { i as __toESM } from "../_runtime.mjs";
2
2
  import { X as require_react, Y 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 { h as OctagonX, i as TriangleAlert, k as CircleCheck, v as Info } from "../_libs/lucide-react.mjs";
5
- import { B as extractMessageText$1, I as createCompactionSummaryItem, N as assistantBlocksFromMessage, P as buildItemsFromSync, V as extractToolText, W as mergeAssistantBlocksForStreaming, _ as Route$46, bt as toolCategoryFromTool, k as TooltipProvider, n as APPLIED_THEME_STORAGE_KEY, t as APPLIED_THEME_CLASSES, x as Spinner, z as extractMessageImages } from "./routes-Qk9CE25v.mjs";
4
+ import { a as TriangleAlert, g as OctagonX, j as CircleCheck, y as Info } from "../_libs/lucide-react.mjs";
5
+ import { B as extractMessageText$1, I as createCompactionSummaryItem, N as assistantBlocksFromMessage, P as buildItemsFromSync, V as extractToolText, W as mergeAssistantBlocksForStreaming, _ as Route$48, bt as toolCategoryFromTool, k as TooltipProvider, n as APPLIED_THEME_STORAGE_KEY, t as APPLIED_THEME_CLASSES, x as Spinner, z as extractMessageImages } from "./routes-DGmloWuq.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-Bw2oDzya.js
23
+ //#region node_modules/.nitro/vite/services/ssr/assets/router-BabRxx9-.js
24
24
  var import_react = /* @__PURE__ */ __toESM(require_react());
25
25
  var import_jsx_runtime = require_jsx_runtime();
26
26
  var Toaster$1 = ({ ...props }) => {
@@ -71,7 +71,7 @@ function AppProviders({ children }) {
71
71
  })
72
72
  });
73
73
  }
74
- var styles_default = "/assets/styles-DTlmo-Vu.css";
74
+ var styles_default = "/assets/styles-BQfGMPRk.css";
75
75
  var TANSTACK_DEVTOOLS_SETTINGS_KEY = "tanstack_devtools_settings";
76
76
  var TANSTACK_DEVTOOLS_DEFAULTS_STORAGE_KEY = "pico-tanstack-devtools-defaults-v1";
77
77
  var TANSTACK_DEVTOOLS_CONFIG = {
@@ -79,7 +79,7 @@ var TANSTACK_DEVTOOLS_CONFIG = {
79
79
  openHotkey: ["Control", "`"],
80
80
  triggerHidden: true
81
81
  };
82
- var Route$45 = createRootRoute({
82
+ var Route$47 = createRootRoute({
83
83
  head: () => ({
84
84
  meta: [
85
85
  { charSet: "utf-8" },
@@ -2289,6 +2289,65 @@ async function readDirectoryGitChanges(cwd, { force = false } = {}) {
2289
2289
  });
2290
2290
  return value;
2291
2291
  }
2292
+ function uniqueGitActionPaths(paths) {
2293
+ return Array.from(new Set(paths.filter((path) => Boolean(path))));
2294
+ }
2295
+ async function stageDirectoryGitFile(cwd, path, previousPath) {
2296
+ const normalizedCwd = normalizeGitCwd(cwd);
2297
+ const normalizedPath = assertGitFilePath(path);
2298
+ const normalizedPreviousPath = previousPath ? assertGitFilePath(previousPath) : void 0;
2299
+ if (!normalizedCwd) throw new Error("cwd is required");
2300
+ if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
2301
+ const result = await runCommand("git", [
2302
+ "add",
2303
+ "-A",
2304
+ "--",
2305
+ ...uniqueGitActionPaths([normalizedPreviousPath, normalizedPath])
2306
+ ], {
2307
+ cwd: normalizedCwd,
2308
+ timeoutMs: GIT_ACTION_TIMEOUT_MS
2309
+ });
2310
+ if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to stage changes", result));
2311
+ invalidateDirectoryGitCaches(normalizedCwd);
2312
+ return {
2313
+ stdout: result.stdout,
2314
+ stderr: result.stderr
2315
+ };
2316
+ }
2317
+ async function discardDirectoryGitFile(cwd, path, previousPath, status) {
2318
+ const normalizedCwd = normalizeGitCwd(cwd);
2319
+ const normalizedPath = assertGitFilePath(path);
2320
+ const normalizedPreviousPath = previousPath ? assertGitFilePath(previousPath) : void 0;
2321
+ const normalizedStatus = typeof status === "string" ? status.slice(0, 2) : "";
2322
+ if (!normalizedCwd) throw new Error("cwd is required");
2323
+ if (!await isInsideWorkTree(normalizedCwd)) throw new Error("No git repository detected");
2324
+ const paths = uniqueGitActionPaths([normalizedPreviousPath, normalizedPath]);
2325
+ const result = normalizedStatus === "??" ? await runCommand("git", [
2326
+ "clean",
2327
+ "-f",
2328
+ "--",
2329
+ normalizedPath
2330
+ ], {
2331
+ cwd: normalizedCwd,
2332
+ timeoutMs: GIT_ACTION_TIMEOUT_MS
2333
+ }) : await runCommand("git", [
2334
+ "restore",
2335
+ "--source=HEAD",
2336
+ "--staged",
2337
+ "--worktree",
2338
+ "--",
2339
+ ...paths
2340
+ ], {
2341
+ cwd: normalizedCwd,
2342
+ timeoutMs: GIT_ACTION_TIMEOUT_MS
2343
+ });
2344
+ if (result.code !== 0) throw new Error(gitCommandErrorMessage("Failed to discard changes", result));
2345
+ invalidateDirectoryGitCaches(normalizedCwd);
2346
+ return {
2347
+ stdout: result.stdout,
2348
+ stderr: result.stderr
2349
+ };
2350
+ }
2292
2351
  async function commitDirectoryGitChanges(cwd, message, { push = false, forcePush = false, includeUnstaged = true } = {}) {
2293
2352
  const normalizedCwd = normalizeGitCwd(cwd);
2294
2353
  const normalizedMessage = cleanupCommitMessageCandidate(message);
@@ -5852,7 +5911,7 @@ function getPicoRuntime() {
5852
5911
  globalThis.__picoRuntime ??= new PicoRuntime();
5853
5912
  return globalThis.__picoRuntime;
5854
5913
  }
5855
- var Route$44 = createFileRoute("/events")({ server: { handlers: { GET: ({ request }) => getPicoRuntime().createEventsResponse(request) } } });
5914
+ var Route$46 = createFileRoute("/events")({ server: { handlers: { GET: ({ request }) => getPicoRuntime().createEventsResponse(request) } } });
5856
5915
  function jsonResponse(data, init = 200) {
5857
5916
  const responseInit = typeof init === "number" ? { status: init } : init;
5858
5917
  const headers = new Headers(responseInit.headers);
@@ -5888,7 +5947,7 @@ function routeErrorResponse(error, fallbackMessage) {
5888
5947
  async function readRequestJson(request) {
5889
5948
  return await request.json().catch(() => ({}));
5890
5949
  }
5891
- var Route$43 = createFileRoute("/api/thinking")({ server: { handlers: { POST: async ({ request }) => {
5950
+ var Route$45 = createFileRoute("/api/thinking")({ server: { handlers: { POST: async ({ request }) => {
5892
5951
  try {
5893
5952
  const body = await readRequestJson(request);
5894
5953
  return jsonResponse(await getPicoRuntime().setThinking(request, body));
@@ -5896,7 +5955,7 @@ var Route$43 = createFileRoute("/api/thinking")({ server: { handlers: { POST: as
5896
5955
  return routeErrorResponse(error, "Failed to update thinking level");
5897
5956
  }
5898
5957
  } } } });
5899
- var Route$42 = createFileRoute("/api/slash-command")({ server: { handlers: { POST: async ({ request }) => {
5958
+ var Route$44 = createFileRoute("/api/slash-command")({ server: { handlers: { POST: async ({ request }) => {
5900
5959
  try {
5901
5960
  const body = await readRequestJson(request);
5902
5961
  return jsonResponse(await getPicoRuntime().runSlashCommand(request, body));
@@ -5904,7 +5963,7 @@ var Route$42 = createFileRoute("/api/slash-command")({ server: { handlers: { POS
5904
5963
  return routeErrorResponse(error, "Failed to run slash command");
5905
5964
  }
5906
5965
  } } } });
5907
- var Route$41 = createFileRoute("/api/provider-usage")({ server: { handlers: { GET: async ({ request }) => {
5966
+ var Route$43 = createFileRoute("/api/provider-usage")({ server: { handlers: { GET: async ({ request }) => {
5908
5967
  const provider = new URL(request.url).searchParams.get("provider") || void 0;
5909
5968
  try {
5910
5969
  return jsonResponse({
@@ -5915,7 +5974,7 @@ var Route$41 = createFileRoute("/api/provider-usage")({ server: { handlers: { GE
5915
5974
  return routeErrorResponse(error, "Failed to read provider usage");
5916
5975
  }
5917
5976
  } } } });
5918
- var Route$40 = createFileRoute("/api/prompt")({ server: { handlers: { POST: async ({ request }) => {
5977
+ var Route$42 = createFileRoute("/api/prompt")({ server: { handlers: { POST: async ({ request }) => {
5919
5978
  try {
5920
5979
  const body = await readRequestJson(request);
5921
5980
  return jsonResponse(await getPicoRuntime().prompt(request, body));
@@ -6436,7 +6495,7 @@ async function listFileReferenceEntries(query, baseCwd, { isQuotedPrefix = false
6436
6495
  };
6437
6496
  });
6438
6497
  }
6439
- var Route$39 = createFileRoute("/api/path-completions")({ server: { handlers: { POST: async ({ request }) => {
6498
+ var Route$41 = createFileRoute("/api/path-completions")({ server: { handlers: { POST: async ({ request }) => {
6440
6499
  try {
6441
6500
  const body = await readRequestJson(request);
6442
6501
  const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
@@ -6452,7 +6511,7 @@ var Route$39 = createFileRoute("/api/path-completions")({ server: { handlers: {
6452
6511
  return routeErrorResponse(error, "Failed to list path completions");
6453
6512
  }
6454
6513
  } } } });
6455
- var Route$38 = createFileRoute("/api/model")({ server: { handlers: { POST: async ({ request }) => {
6514
+ var Route$40 = createFileRoute("/api/model")({ server: { handlers: { POST: async ({ request }) => {
6456
6515
  try {
6457
6516
  const body = await readRequestJson(request);
6458
6517
  return jsonResponse(await getPicoRuntime().setModel(request, body));
@@ -6460,7 +6519,7 @@ var Route$38 = createFileRoute("/api/model")({ server: { handlers: { POST: async
6460
6519
  return routeErrorResponse(error, "Failed to update model");
6461
6520
  }
6462
6521
  } } } });
6463
- var Route$37 = createFileRoute("/api/highlight")({ server: { handlers: { POST: async ({ request }) => {
6522
+ var Route$39 = createFileRoute("/api/highlight")({ server: { handlers: { POST: async ({ request }) => {
6464
6523
  try {
6465
6524
  const body = await readRequestJson(request);
6466
6525
  return jsonResponse(await getPicoRuntime().highlightCode(body.code, body.language));
@@ -6468,7 +6527,7 @@ var Route$37 = createFileRoute("/api/highlight")({ server: { handlers: { POST: a
6468
6527
  return routeErrorResponse(error, "Failed to highlight code");
6469
6528
  }
6470
6529
  } } } });
6471
- var Route$36 = createFileRoute("/api/git-status")({ server: { handlers: { GET: async ({ request }) => {
6530
+ var Route$38 = createFileRoute("/api/git-status")({ server: { handlers: { GET: async ({ request }) => {
6472
6531
  const requestedCwd = new URL(request.url).searchParams.get("cwd") || "";
6473
6532
  if (!requestedCwd.trim()) return errorResponse("cwd is required");
6474
6533
  try {
@@ -6483,7 +6542,28 @@ var Route$36 = createFileRoute("/api/git-status")({ server: { handlers: { GET: a
6483
6542
  return routeErrorResponse(error, "Failed to read git status");
6484
6543
  }
6485
6544
  } } } });
6486
- var Route$35 = createFileRoute("/api/git-review")({ server: { handlers: { GET: async ({ request }) => {
6545
+ var Route$37 = createFileRoute("/api/git-stage")({ server: { handlers: { POST: async ({ request }) => {
6546
+ try {
6547
+ const body = await readRequestJson(request);
6548
+ const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
6549
+ const path = typeof body.path === "string" ? body.path : "";
6550
+ const previousPath = typeof body.previousPath === "string" ? body.previousPath : "";
6551
+ if (!requestedCwd.trim()) throw new Error("cwd is required");
6552
+ if (!path.trim()) throw new Error("file path is required");
6553
+ const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
6554
+ const cwd = await resolveDirectoryPath(requestedCwd, getPicoRuntime().getBaseCwd(activeEntry, context));
6555
+ const result = await stageDirectoryGitFile(cwd, path, previousPath || void 0);
6556
+ return jsonResponse({
6557
+ ok: true,
6558
+ cwd,
6559
+ stdout: result.stdout,
6560
+ stderr: result.stderr
6561
+ });
6562
+ } catch (error) {
6563
+ return routeErrorResponse(error, "Failed to stage changes");
6564
+ }
6565
+ } } } });
6566
+ var Route$36 = createFileRoute("/api/git-review")({ server: { handlers: { GET: async ({ request }) => {
6487
6567
  const url = new URL(request.url);
6488
6568
  const requestedCwd = url.searchParams.get("cwd") || "";
6489
6569
  const requestedPath = url.searchParams.get("path") || "";
@@ -6506,7 +6586,7 @@ var Route$35 = createFileRoute("/api/git-review")({ server: { handlers: { GET: a
6506
6586
  return routeErrorResponse(error, "Failed to read git review file");
6507
6587
  }
6508
6588
  } } } });
6509
- var Route$34 = createFileRoute("/api/git-push")({ server: { handlers: { POST: async ({ request }) => {
6589
+ var Route$35 = createFileRoute("/api/git-push")({ server: { handlers: { POST: async ({ request }) => {
6510
6590
  try {
6511
6591
  const body = await readRequestJson(request);
6512
6592
  const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
@@ -6525,7 +6605,7 @@ var Route$34 = createFileRoute("/api/git-push")({ server: { handlers: { POST: as
6525
6605
  return routeErrorResponse(error, "Failed to push changes");
6526
6606
  }
6527
6607
  } } } });
6528
- var Route$33 = createFileRoute("/api/git-pull")({ server: { handlers: { POST: async ({ request }) => {
6608
+ var Route$34 = createFileRoute("/api/git-pull")({ server: { handlers: { POST: async ({ request }) => {
6529
6609
  try {
6530
6610
  const body = await readRequestJson(request);
6531
6611
  const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
@@ -6543,6 +6623,28 @@ var Route$33 = createFileRoute("/api/git-pull")({ server: { handlers: { POST: as
6543
6623
  return routeErrorResponse(error, "Failed to pull changes");
6544
6624
  }
6545
6625
  } } } });
6626
+ var Route$33 = createFileRoute("/api/git-discard")({ server: { handlers: { POST: async ({ request }) => {
6627
+ try {
6628
+ const body = await readRequestJson(request);
6629
+ const requestedCwd = typeof body.cwd === "string" ? body.cwd : "";
6630
+ const path = typeof body.path === "string" ? body.path : "";
6631
+ const previousPath = typeof body.previousPath === "string" ? body.previousPath : "";
6632
+ const status = typeof body.status === "string" ? body.status : "";
6633
+ if (!requestedCwd.trim()) throw new Error("cwd is required");
6634
+ if (!path.trim()) throw new Error("file path is required");
6635
+ const { context, activeEntry } = await getPicoRuntime().resolveRequest(request);
6636
+ const cwd = await resolveDirectoryPath(requestedCwd, getPicoRuntime().getBaseCwd(activeEntry, context));
6637
+ const result = await discardDirectoryGitFile(cwd, path, previousPath || void 0, status || void 0);
6638
+ return jsonResponse({
6639
+ ok: true,
6640
+ cwd,
6641
+ stdout: result.stdout,
6642
+ stderr: result.stderr
6643
+ });
6644
+ } catch (error) {
6645
+ return routeErrorResponse(error, "Failed to discard changes");
6646
+ }
6647
+ } } } });
6546
6648
  var Route$32 = createFileRoute("/api/git-diff")({ server: { handlers: { GET: async ({ request }) => {
6547
6649
  const url = new URL(request.url);
6548
6650
  const requestedCwd = url.searchParams.get("cwd") || "";
@@ -7021,205 +7123,215 @@ var Route = createFileRoute("/api/session/tree/label")({ server: { handlers: { P
7021
7123
  return routeErrorResponse(error, "Failed to update tree label");
7022
7124
  }
7023
7125
  } } } });
7024
- var EventsRoute = Route$44.update({
7126
+ var EventsRoute = Route$46.update({
7025
7127
  id: "/events",
7026
7128
  path: "/events",
7027
- getParentRoute: () => Route$45
7129
+ getParentRoute: () => Route$47
7028
7130
  });
7029
- var IndexRoute = Route$46.update({
7131
+ var IndexRoute = Route$48.update({
7030
7132
  id: "/",
7031
7133
  path: "/",
7032
- getParentRoute: () => Route$45
7134
+ getParentRoute: () => Route$47
7033
7135
  });
7034
- var ApiThinkingRoute = Route$43.update({
7136
+ var ApiThinkingRoute = Route$45.update({
7035
7137
  id: "/api/thinking",
7036
7138
  path: "/api/thinking",
7037
- getParentRoute: () => Route$45
7139
+ getParentRoute: () => Route$47
7038
7140
  });
7039
- var ApiSlashCommandRoute = Route$42.update({
7141
+ var ApiSlashCommandRoute = Route$44.update({
7040
7142
  id: "/api/slash-command",
7041
7143
  path: "/api/slash-command",
7042
- getParentRoute: () => Route$45
7144
+ getParentRoute: () => Route$47
7043
7145
  });
7044
- var ApiProviderUsageRoute = Route$41.update({
7146
+ var ApiProviderUsageRoute = Route$43.update({
7045
7147
  id: "/api/provider-usage",
7046
7148
  path: "/api/provider-usage",
7047
- getParentRoute: () => Route$45
7149
+ getParentRoute: () => Route$47
7048
7150
  });
7049
- var ApiPromptRoute = Route$40.update({
7151
+ var ApiPromptRoute = Route$42.update({
7050
7152
  id: "/api/prompt",
7051
7153
  path: "/api/prompt",
7052
- getParentRoute: () => Route$45
7154
+ getParentRoute: () => Route$47
7053
7155
  });
7054
- var ApiPathCompletionsRoute = Route$39.update({
7156
+ var ApiPathCompletionsRoute = Route$41.update({
7055
7157
  id: "/api/path-completions",
7056
7158
  path: "/api/path-completions",
7057
- getParentRoute: () => Route$45
7159
+ getParentRoute: () => Route$47
7058
7160
  });
7059
- var ApiModelRoute = Route$38.update({
7161
+ var ApiModelRoute = Route$40.update({
7060
7162
  id: "/api/model",
7061
7163
  path: "/api/model",
7062
- getParentRoute: () => Route$45
7164
+ getParentRoute: () => Route$47
7063
7165
  });
7064
- var ApiHighlightRoute = Route$37.update({
7166
+ var ApiHighlightRoute = Route$39.update({
7065
7167
  id: "/api/highlight",
7066
7168
  path: "/api/highlight",
7067
- getParentRoute: () => Route$45
7169
+ getParentRoute: () => Route$47
7068
7170
  });
7069
- var ApiGitStatusRoute = Route$36.update({
7171
+ var ApiGitStatusRoute = Route$38.update({
7070
7172
  id: "/api/git-status",
7071
7173
  path: "/api/git-status",
7072
- getParentRoute: () => Route$45
7174
+ getParentRoute: () => Route$47
7073
7175
  });
7074
- var ApiGitReviewRoute = Route$35.update({
7176
+ var ApiGitStageRoute = Route$37.update({
7177
+ id: "/api/git-stage",
7178
+ path: "/api/git-stage",
7179
+ getParentRoute: () => Route$47
7180
+ });
7181
+ var ApiGitReviewRoute = Route$36.update({
7075
7182
  id: "/api/git-review",
7076
7183
  path: "/api/git-review",
7077
- getParentRoute: () => Route$45
7184
+ getParentRoute: () => Route$47
7078
7185
  });
7079
- var ApiGitPushRoute = Route$34.update({
7186
+ var ApiGitPushRoute = Route$35.update({
7080
7187
  id: "/api/git-push",
7081
7188
  path: "/api/git-push",
7082
- getParentRoute: () => Route$45
7189
+ getParentRoute: () => Route$47
7083
7190
  });
7084
- var ApiGitPullRoute = Route$33.update({
7191
+ var ApiGitPullRoute = Route$34.update({
7085
7192
  id: "/api/git-pull",
7086
7193
  path: "/api/git-pull",
7087
- getParentRoute: () => Route$45
7194
+ getParentRoute: () => Route$47
7195
+ });
7196
+ var ApiGitDiscardRoute = Route$33.update({
7197
+ id: "/api/git-discard",
7198
+ path: "/api/git-discard",
7199
+ getParentRoute: () => Route$47
7088
7200
  });
7089
7201
  var ApiGitDiffRoute = Route$32.update({
7090
7202
  id: "/api/git-diff",
7091
7203
  path: "/api/git-diff",
7092
- getParentRoute: () => Route$45
7204
+ getParentRoute: () => Route$47
7093
7205
  });
7094
7206
  var ApiGitCommitMessageRoute = Route$31.update({
7095
7207
  id: "/api/git-commit-message",
7096
7208
  path: "/api/git-commit-message",
7097
- getParentRoute: () => Route$45
7209
+ getParentRoute: () => Route$47
7098
7210
  });
7099
7211
  var ApiGitCommitRoute = Route$30.update({
7100
7212
  id: "/api/git-commit",
7101
7213
  path: "/api/git-commit",
7102
- getParentRoute: () => Route$45
7214
+ getParentRoute: () => Route$47
7103
7215
  });
7104
7216
  var ApiGitCheckoutRoute = Route$29.update({
7105
7217
  id: "/api/git-checkout",
7106
7218
  path: "/api/git-checkout",
7107
- getParentRoute: () => Route$45
7219
+ getParentRoute: () => Route$47
7108
7220
  });
7109
7221
  var ApiGitChangesRoute = Route$28.update({
7110
7222
  id: "/api/git-changes",
7111
7223
  path: "/api/git-changes",
7112
- getParentRoute: () => Route$45
7224
+ getParentRoute: () => Route$47
7113
7225
  });
7114
7226
  var ApiFileCompletionsRoute = Route$27.update({
7115
7227
  id: "/api/file-completions",
7116
7228
  path: "/api/file-completions",
7117
- getParentRoute: () => Route$45
7229
+ getParentRoute: () => Route$47
7118
7230
  });
7119
7231
  var ApiDirectorySessionsIndexesRoute = Route$26.update({
7120
7232
  id: "/api/directory-sessions-indexes",
7121
7233
  path: "/api/directory-sessions-indexes",
7122
- getParentRoute: () => Route$45
7234
+ getParentRoute: () => Route$47
7123
7235
  });
7124
7236
  var ApiDirectorySessionsIndexRoute = Route$25.update({
7125
7237
  id: "/api/directory-sessions-index",
7126
7238
  path: "/api/directory-sessions-index",
7127
- getParentRoute: () => Route$45
7239
+ getParentRoute: () => Route$47
7128
7240
  });
7129
7241
  var ApiDirectorySessionsRoute = Route$24.update({
7130
7242
  id: "/api/directory-sessions",
7131
7243
  path: "/api/directory-sessions",
7132
- getParentRoute: () => Route$45
7244
+ getParentRoute: () => Route$47
7133
7245
  });
7134
7246
  var ApiDirectorySearchRoute = Route$23.update({
7135
7247
  id: "/api/directory-search",
7136
7248
  path: "/api/directory-search",
7137
- getParentRoute: () => Route$45
7249
+ getParentRoute: () => Route$47
7138
7250
  });
7139
7251
  var ApiAbortRoute = Route$22.update({
7140
7252
  id: "/api/abort",
7141
7253
  path: "/api/abort",
7142
- getParentRoute: () => Route$45
7254
+ getParentRoute: () => Route$47
7143
7255
  });
7144
7256
  var ApiUiIdRoute = Route$21.update({
7145
7257
  id: "/api/ui/$id",
7146
7258
  path: "/api/ui/$id",
7147
- getParentRoute: () => Route$45
7259
+ getParentRoute: () => Route$47
7148
7260
  });
7149
7261
  var ApiSettingsHideThinkingRoute = Route$20.update({
7150
7262
  id: "/api/settings/hide-thinking",
7151
7263
  path: "/api/settings/hide-thinking",
7152
- getParentRoute: () => Route$45
7264
+ getParentRoute: () => Route$47
7153
7265
  });
7154
7266
  var ApiSessionsDeleteRoute = Route$19.update({
7155
7267
  id: "/api/sessions/delete",
7156
7268
  path: "/api/sessions/delete",
7157
- getParentRoute: () => Route$45
7269
+ getParentRoute: () => Route$47
7158
7270
  });
7159
7271
  var ApiSessionTreeRoute = Route$18.update({
7160
7272
  id: "/api/session/tree",
7161
7273
  path: "/api/session/tree",
7162
- getParentRoute: () => Route$45
7274
+ getParentRoute: () => Route$47
7163
7275
  });
7164
7276
  var ApiSessionSelectRoute = Route$17.update({
7165
7277
  id: "/api/session/select",
7166
7278
  path: "/api/session/select",
7167
- getParentRoute: () => Route$45
7279
+ getParentRoute: () => Route$47
7168
7280
  });
7169
7281
  var ApiSessionRenameRoute = Route$16.update({
7170
7282
  id: "/api/session/rename",
7171
7283
  path: "/api/session/rename",
7172
- getParentRoute: () => Route$45
7284
+ getParentRoute: () => Route$47
7173
7285
  });
7174
7286
  var ApiSessionNewRoute = Route$15.update({
7175
7287
  id: "/api/session/new",
7176
7288
  path: "/api/session/new",
7177
- getParentRoute: () => Route$45
7289
+ getParentRoute: () => Route$47
7178
7290
  });
7179
7291
  var ApiSessionHistoryRoute = Route$14.update({
7180
7292
  id: "/api/session/history",
7181
7293
  path: "/api/session/history",
7182
- getParentRoute: () => Route$45
7294
+ getParentRoute: () => Route$47
7183
7295
  });
7184
7296
  var ApiSessionForkRoute = Route$13.update({
7185
7297
  id: "/api/session/fork",
7186
7298
  path: "/api/session/fork",
7187
- getParentRoute: () => Route$45
7299
+ getParentRoute: () => Route$47
7188
7300
  });
7189
7301
  var ApiSessionDeleteRoute = Route$12.update({
7190
7302
  id: "/api/session/delete",
7191
7303
  path: "/api/session/delete",
7192
- getParentRoute: () => Route$45
7304
+ getParentRoute: () => Route$47
7193
7305
  });
7194
7306
  var ApiSessionCloneRoute = Route$11.update({
7195
7307
  id: "/api/session/clone",
7196
7308
  path: "/api/session/clone",
7197
- getParentRoute: () => Route$45
7309
+ getParentRoute: () => Route$47
7198
7310
  });
7199
7311
  var ApiPendingMessagesReorderRoute = Route$10.update({
7200
7312
  id: "/api/pending-messages/reorder",
7201
7313
  path: "/api/pending-messages/reorder",
7202
- getParentRoute: () => Route$45
7314
+ getParentRoute: () => Route$47
7203
7315
  });
7204
7316
  var ApiPendingMessageRemoveRoute = Route$9.update({
7205
7317
  id: "/api/pending-message/remove",
7206
7318
  path: "/api/pending-message/remove",
7207
- getParentRoute: () => Route$45
7319
+ getParentRoute: () => Route$47
7208
7320
  });
7209
7321
  var ApiFilesTreeRoute = Route$8.update({
7210
7322
  id: "/api/files/tree",
7211
7323
  path: "/api/files/tree",
7212
- getParentRoute: () => Route$45
7324
+ getParentRoute: () => Route$47
7213
7325
  });
7214
7326
  var ApiFilesReadRoute = Route$7.update({
7215
7327
  id: "/api/files/read",
7216
7328
  path: "/api/files/read",
7217
- getParentRoute: () => Route$45
7329
+ getParentRoute: () => Route$47
7218
7330
  });
7219
7331
  var ApiDirectoryResolveRoute = Route$6.update({
7220
7332
  id: "/api/directory/resolve",
7221
7333
  path: "/api/directory/resolve",
7222
- getParentRoute: () => Route$45
7334
+ getParentRoute: () => Route$47
7223
7335
  });
7224
7336
  var ApiDirectorySessionsCleanupRoute = Route$5.update({
7225
7337
  id: "/cleanup",
@@ -7229,22 +7341,22 @@ var ApiDirectorySessionsCleanupRoute = Route$5.update({
7229
7341
  var ApiAuthProvidersRoute = Route$4.update({
7230
7342
  id: "/api/auth/providers",
7231
7343
  path: "/api/auth/providers",
7232
- getParentRoute: () => Route$45
7344
+ getParentRoute: () => Route$47
7233
7345
  });
7234
7346
  var ApiAuthOauthRoute = Route$3.update({
7235
7347
  id: "/api/auth/oauth",
7236
7348
  path: "/api/auth/oauth",
7237
- getParentRoute: () => Route$45
7349
+ getParentRoute: () => Route$47
7238
7350
  });
7239
7351
  var ApiAuthLogoutRoute = Route$2.update({
7240
7352
  id: "/api/auth/logout",
7241
7353
  path: "/api/auth/logout",
7242
- getParentRoute: () => Route$45
7354
+ getParentRoute: () => Route$47
7243
7355
  });
7244
7356
  var ApiAuthApiKeyRoute = Route$1.update({
7245
7357
  id: "/api/auth/api-key",
7246
7358
  path: "/api/auth/api-key",
7247
- getParentRoute: () => Route$45
7359
+ getParentRoute: () => Route$47
7248
7360
  });
7249
7361
  var ApiSessionTreeLabelRoute = Route.update({
7250
7362
  id: "/label",
@@ -7268,9 +7380,11 @@ var rootRouteChildren = {
7268
7380
  ApiGitCommitRoute,
7269
7381
  ApiGitCommitMessageRoute,
7270
7382
  ApiGitDiffRoute,
7383
+ ApiGitDiscardRoute,
7271
7384
  ApiGitPullRoute,
7272
7385
  ApiGitPushRoute,
7273
7386
  ApiGitReviewRoute,
7387
+ ApiGitStageRoute,
7274
7388
  ApiGitStatusRoute,
7275
7389
  ApiHighlightRoute,
7276
7390
  ApiModelRoute,
@@ -7300,7 +7414,7 @@ var rootRouteChildren = {
7300
7414
  ApiSettingsHideThinkingRoute,
7301
7415
  ApiUiIdRoute
7302
7416
  };
7303
- var routeTree = Route$45._addFileChildren(rootRouteChildren)._addFileTypes();
7417
+ var routeTree = Route$47._addFileChildren(rootRouteChildren)._addFileTypes();
7304
7418
  function getRouter() {
7305
7419
  const queryClient = new QueryClient({ defaultOptions: { queries: {
7306
7420
  retry: 1,
@@ -3,9 +3,9 @@ import { B as TooltipProvider$1, G as TooltipRoot, H as TooltipPositioner, U as
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 { B as ArrowDown, I as ArrowUp, M as ChevronUp, O as Command, R as ArrowRight, V as ArrowBigUp, m as Option, z as ArrowLeft } from "../_libs/lucide-react.mjs";
6
+ import { A as Command, B as ArrowRight, H as ArrowDown, P as ChevronUp, R as ArrowUp, U as ArrowBigUp, V as ArrowLeft, h 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-Qk9CE25v.js
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-DGmloWuq.js
9
9
  var import_react = /* @__PURE__ */ __toESM(require_react());
10
10
  var import_jsx_runtime = require_jsx_runtime();
11
11
  function cn(...inputs) {
@@ -1324,7 +1324,7 @@ function getSessionTitle(summary) {
1324
1324
  if (summary?.name?.trim()) return summary.name.trim();
1325
1325
  return "New session";
1326
1326
  }
1327
- var $$splitComponentImporter = () => import("./routes-C5zYkwvE.mjs");
1327
+ var $$splitComponentImporter = () => import("./routes-y2ECFOMd.mjs");
1328
1328
  var indexSearchSchema = object({ session: string().optional() });
1329
1329
  var Route = createFileRoute("/")({
1330
1330
  validateSearch: indexSearchSchema,