@ottocode/web-sdk 0.1.276 → 0.1.278

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.
@@ -1236,6 +1236,13 @@ var sessionsMixin = {
1236
1236
  throw new Error("Failed to remove from queue");
1237
1237
  return response.data;
1238
1238
  },
1239
+ async sendQueuedMessageNow(sessionId, messageId) {
1240
+ const response = await fetch(`${getBaseUrl()}/v1/sessions/${encodeURIComponent(sessionId)}/queue/${encodeURIComponent(messageId)}/send-now`, { method: "POST" });
1241
+ const data = await response.json().catch(() => null);
1242
+ if (!response.ok)
1243
+ throw new Error(extractErrorMessage(data));
1244
+ return data;
1245
+ },
1239
1246
  async getMessages(sessionId) {
1240
1247
  const response = await apiListMessages({ path: { id: sessionId } });
1241
1248
  if (response.error)
@@ -1947,6 +1954,7 @@ class ApiClient {
1947
1954
  abortMessage = sessionsMixin.abortMessage;
1948
1955
  getQueueState = sessionsMixin.getQueueState;
1949
1956
  removeFromQueue = sessionsMixin.removeFromQueue;
1957
+ sendQueuedMessageNow = sessionsMixin.sendQueuedMessageNow;
1950
1958
  getMessages = sessionsMixin.getMessages;
1951
1959
  sendMessage = sessionsMixin.sendMessage;
1952
1960
  getStreamUrl = sessionsMixin.getStreamUrl;
@@ -3853,6 +3861,7 @@ import {
3853
3861
  Clock,
3854
3862
  ListOrdered,
3855
3863
  RotateCcw,
3864
+ Send,
3856
3865
  Trash2 as Trash22
3857
3866
  } from "lucide-react";
3858
3867
  import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
@@ -4115,6 +4124,7 @@ function getQueuedPreviews(messages, queuedMessages) {
4115
4124
  }
4116
4125
  function QueueRow({
4117
4126
  item,
4127
+ onSendNow,
4118
4128
  onCancel,
4119
4129
  onDelete
4120
4130
  }) {
@@ -4132,6 +4142,15 @@ function QueueRow({
4132
4142
  /* @__PURE__ */ jsxs11("div", {
4133
4143
  className: "flex items-center gap-1 flex-shrink-0",
4134
4144
  children: [
4145
+ /* @__PURE__ */ jsx17("button", {
4146
+ type: "button",
4147
+ onClick: () => onSendNow(item),
4148
+ className: "flex h-7 w-7 items-center justify-center rounded bg-transparent text-muted-foreground transition-colors hover:bg-primary/10 hover:text-primary",
4149
+ title: "Send now",
4150
+ children: /* @__PURE__ */ jsx17(Send, {
4151
+ className: "h-3.5 w-3.5"
4152
+ })
4153
+ }),
4135
4154
  /* @__PURE__ */ jsx17("button", {
4136
4155
  type: "button",
4137
4156
  onClick: () => onCancel(item),
@@ -4181,6 +4200,15 @@ var InputQueueBar = memo4(function InputQueueBar2({
4181
4200
  console.error("Failed to remove queued message:", error);
4182
4201
  }
4183
4202
  };
4203
+ const sendQueuedItemNow = async (item) => {
4204
+ try {
4205
+ await apiClient.sendQueuedMessageNow(sessionId, item.assistantMessageId);
4206
+ queryClient.invalidateQueries({ queryKey: ["messages", sessionId] });
4207
+ queryClient.invalidateQueries({ queryKey: ["queueState", sessionId] });
4208
+ } catch (error) {
4209
+ console.error("Failed to send queued message now:", error);
4210
+ }
4211
+ };
4184
4212
  return /* @__PURE__ */ jsx17("div", {
4185
4213
  className: "grid transition-[grid-template-rows,opacity] duration-200 ease-out",
4186
4214
  style: {
@@ -4279,6 +4307,7 @@ var InputQueueBar = memo4(function InputQueueBar2({
4279
4307
  className: "divide-y divide-border",
4280
4308
  children: queuedItems.map((item) => /* @__PURE__ */ jsx17(QueueRow, {
4281
4309
  item,
4310
+ onSendNow: sendQueuedItemNow,
4282
4311
  onCancel: (queuedItem) => removeQueuedItem(queuedItem, true),
4283
4312
  onDelete: (queuedItem) => removeQueuedItem(queuedItem, false)
4284
4313
  }, item.assistantMessageId))
@@ -8025,7 +8054,9 @@ function getLanguageFromPath(path) {
8025
8054
  html: "html",
8026
8055
  css: "css",
8027
8056
  scss: "scss",
8028
- md: "markdown",
8057
+ md: "text",
8058
+ markdown: "text",
8059
+ mdx: "text",
8029
8060
  txt: "text",
8030
8061
  svelte: "svelte"
8031
8062
  };
@@ -16731,7 +16762,7 @@ var MessageThread = memo16(function MessageThread2({
16731
16762
  }
16732
16763
  };
16733
16764
  const filteredMessages = useMemo17(() => {
16734
- const visibleMessages = messages.filter((message) => message.role !== "system");
16765
+ const visibleMessages = messages.filter((message) => message.role !== "system" && !(message.role === "assistant" && message.status === "complete" && (message.parts?.length ?? 0) === 0));
16735
16766
  const queueBusy = Boolean(queueState.currentMessageId) || queueState.queueLength > 0;
16736
16767
  if (!queueBusy)
16737
16768
  return visibleMessages;
@@ -16902,7 +16933,8 @@ var MessageThread = memo16(function MessageThread2({
16902
16933
  });
16903
16934
  });
16904
16935
  // src/components/messages/MessageThreadContainer.tsx
16905
- import { memo as memo19, useMemo as useMemo18 } from "react";
16936
+ import { memo as memo19, useEffect as useEffect29, useMemo as useMemo18 } from "react";
16937
+ import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
16906
16938
 
16907
16939
  // src/hooks/useSessionStream.ts
16908
16940
  import { useEffect as useEffect26, useRef as useRef18 } from "react";
@@ -19255,10 +19287,16 @@ var MessageThreadContainer = memo19(function MessageThreadContainer2({
19255
19287
  sessionId,
19256
19288
  onSelectSession
19257
19289
  }) {
19290
+ const queryClient = useQueryClient12();
19258
19291
  const { data: messages = [], isLoading } = useMessages(sessionId);
19259
19292
  const { data: sessions = [] } = useSessions();
19260
19293
  const { preferences: preferences2 } = usePreferences();
19261
19294
  useSessionStream(sessionId);
19295
+ useEffect29(() => {
19296
+ queryClient.invalidateQueries({ queryKey: ["messages", sessionId] });
19297
+ queryClient.invalidateQueries({ queryKey: ["queueState", sessionId] });
19298
+ queryClient.invalidateQueries({ queryKey: sessionsQueryKey });
19299
+ }, [queryClient, sessionId]);
19262
19300
  useToolApprovalShortcuts(sessionId);
19263
19301
  const session = useMemo18(() => sessions.find((s) => s.id === sessionId), [sessions, sessionId]);
19264
19302
  const isGenerating = useMemo18(() => messages.some((m) => m.role === "assistant" && m.status === "pending"), [messages]);
@@ -19403,7 +19441,7 @@ var SessionItem = memo20(function SessionItem2({
19403
19441
  });
19404
19442
  });
19405
19443
  // src/components/sessions/SessionListContainer.tsx
19406
- import { memo as memo21, useMemo as useMemo19, useCallback as useCallback20, useEffect as useEffect29, useRef as useRef20 } from "react";
19444
+ import { memo as memo21, useMemo as useMemo19, useCallback as useCallback20, useEffect as useEffect30, useRef as useRef20 } from "react";
19407
19445
 
19408
19446
  // src/stores/focusStore.ts
19409
19447
  import { create as create20 } from "zustand";
@@ -19499,7 +19537,7 @@ var SessionListContainer = memo21(function SessionListContainer2({
19499
19537
  sessions: groupedSessions
19500
19538
  }));
19501
19539
  }, [sessionSnapshot, statusSessionIds]);
19502
- useEffect29(() => {
19540
+ useEffect30(() => {
19503
19541
  if (currentFocus === "sessions") {
19504
19542
  const session = sessionSnapshot[sessionIndex];
19505
19543
  if (session) {
@@ -19522,14 +19560,14 @@ var SessionListContainer = memo21(function SessionListContainer2({
19522
19560
  onError: () => markedViewedRef.current.delete(session.id)
19523
19561
  });
19524
19562
  }, [markSessionViewed, sessionSnapshot]);
19525
- useEffect29(() => {
19563
+ useEffect30(() => {
19526
19564
  const previousId = previousActiveSessionId.current;
19527
19565
  if (previousId && previousId !== activeSessionId) {
19528
19566
  markViewedIfReady(previousId);
19529
19567
  }
19530
19568
  previousActiveSessionId.current = activeSessionId;
19531
19569
  }, [activeSessionId, markViewedIfReady]);
19532
- useEffect29(() => {
19570
+ useEffect30(() => {
19533
19571
  if (!activeSessionId || lastScrolledSessionId.current === activeSessionId || sessions.length === 0)
19534
19572
  return;
19535
19573
  const activeIndex = sessions.findIndex((s) => s.id === activeSessionId);
@@ -19545,7 +19583,7 @@ var SessionListContainer = memo21(function SessionListContainer2({
19545
19583
  });
19546
19584
  }
19547
19585
  }, [activeSessionId, sessions, hasNextPage, fetchNextPage]);
19548
- useEffect29(() => {
19586
+ useEffect30(() => {
19549
19587
  const container = scrollContainerRef.current;
19550
19588
  if (!container)
19551
19589
  return;
@@ -19566,7 +19604,7 @@ var SessionListContainer = memo21(function SessionListContainer2({
19566
19604
  container.addEventListener("scroll", handleScroll, { passive: true });
19567
19605
  return () => container.removeEventListener("scroll", handleScroll);
19568
19606
  }, [hasNextPage, isFetchingNextPage, fetchNextPage]);
19569
- useEffect29(() => {
19607
+ useEffect30(() => {
19570
19608
  const container = scrollContainerRef.current;
19571
19609
  const sentinel = paginationSentinelRef.current;
19572
19610
  if (!container || !sentinel || typeof IntersectionObserver === "undefined") {
@@ -19715,7 +19753,7 @@ import {
19715
19753
  lineNumbers
19716
19754
  } from "@codemirror/view";
19717
19755
  import { tags } from "@lezer/highlight";
19718
- import { useCallback as useCallback21, useEffect as useEffect30, useMemo as useMemo20, useRef as useRef21 } from "react";
19756
+ import { useCallback as useCallback21, useEffect as useEffect31, useMemo as useMemo20, useRef as useRef21 } from "react";
19719
19757
  import { jsx as jsx78 } from "react/jsx-runtime";
19720
19758
  var viewerTheme = EditorView.theme({
19721
19759
  "&": {
@@ -19893,7 +19931,7 @@ function lineDecorationsExtension(highlightedLines, highlightTone = "primary", l
19893
19931
  return builder.finish();
19894
19932
  });
19895
19933
  }
19896
- function getLanguageExtension(path) {
19934
+ function getLanguageExtension(path, disableMarkdownSyntax = false) {
19897
19935
  const ext = path?.split(".").pop()?.toLowerCase() ?? "";
19898
19936
  switch (ext) {
19899
19937
  case "js":
@@ -19925,6 +19963,8 @@ function getLanguageExtension(path) {
19925
19963
  case "md":
19926
19964
  case "markdown":
19927
19965
  case "mdx":
19966
+ if (disableMarkdownSyntax)
19967
+ return [];
19928
19968
  return markdown();
19929
19969
  case "sql":
19930
19970
  return sql();
@@ -19951,7 +19991,8 @@ function CodeMirrorViewer({
19951
19991
  highlightTone = "primary",
19952
19992
  lineTones,
19953
19993
  scrollToLine,
19954
- scrollToEndSignal
19994
+ scrollToEndSignal,
19995
+ disableMarkdownSyntax = false
19955
19996
  }) {
19956
19997
  const hostRef = useRef21(null);
19957
19998
  const viewRef = useRef21(null);
@@ -19960,7 +20001,7 @@ function CodeMirrorViewer({
19960
20001
  const decorationsCompartmentRef = useRef21(new Compartment);
19961
20002
  const languageExtensionRef = useRef21([]);
19962
20003
  const decorationsExtensionRef = useRef21([]);
19963
- const languageExtension = useMemo20(() => getLanguageExtension(path), [path]);
20004
+ const languageExtension = useMemo20(() => getLanguageExtension(path, disableMarkdownSyntax), [path, disableMarkdownSyntax]);
19964
20005
  const decorationsExtension = useMemo20(() => lineDecorationsExtension(highlightedLines, highlightTone, lineTones), [highlightedLines, highlightTone, lineTones]);
19965
20006
  languageExtensionRef.current = languageExtension;
19966
20007
  decorationsExtensionRef.current = decorationsExtension;
@@ -19976,7 +20017,7 @@ function CodeMirrorViewer({
19976
20017
  decorationsCompartmentRef.current.of(decorationsExtension)
19977
20018
  ]
19978
20019
  }), [languageExtension, decorationsExtension]);
19979
- useEffect30(() => {
20020
+ useEffect31(() => {
19980
20021
  const host = hostRef.current;
19981
20022
  if (!host)
19982
20023
  return;
@@ -20003,7 +20044,7 @@ function CodeMirrorViewer({
20003
20044
  viewRef.current = null;
20004
20045
  };
20005
20046
  }, []);
20006
- useEffect30(() => {
20047
+ useEffect31(() => {
20007
20048
  const view = viewRef.current;
20008
20049
  if (!view)
20009
20050
  return;
@@ -20015,7 +20056,7 @@ function CodeMirrorViewer({
20015
20056
  view.setState(createEditorState(contentRef.current));
20016
20057
  }
20017
20058
  }, [languageExtension, createEditorState]);
20018
- useEffect30(() => {
20059
+ useEffect31(() => {
20019
20060
  const view = viewRef.current;
20020
20061
  if (!view)
20021
20062
  return;
@@ -20027,7 +20068,7 @@ function CodeMirrorViewer({
20027
20068
  view.setState(createEditorState(contentRef.current));
20028
20069
  }
20029
20070
  }, [decorationsExtension, createEditorState]);
20030
- useEffect30(() => {
20071
+ useEffect31(() => {
20031
20072
  const view = viewRef.current;
20032
20073
  if (!view)
20033
20074
  return;
@@ -20043,7 +20084,7 @@ function CodeMirrorViewer({
20043
20084
  }
20044
20085
  contentRef.current = content;
20045
20086
  }, [content, createEditorState]);
20046
- useEffect30(() => {
20087
+ useEffect31(() => {
20047
20088
  const view = viewRef.current;
20048
20089
  if (!view || !scrollToLine || scrollToLine < 1)
20049
20090
  return;
@@ -20056,7 +20097,7 @@ function CodeMirrorViewer({
20056
20097
  view.setState(createEditorState(contentRef.current));
20057
20098
  }
20058
20099
  }, [scrollToLine, createEditorState]);
20059
- useEffect30(() => {
20100
+ useEffect31(() => {
20060
20101
  const view = viewRef.current;
20061
20102
  if (!view || scrollToEndSignal === undefined)
20062
20103
  return;
@@ -20132,7 +20173,8 @@ function GitDiffViewer({ diff: diff2 }) {
20132
20173
  className: "flex-1 min-h-0",
20133
20174
  children: /* @__PURE__ */ jsx79(CodeMirrorViewer, {
20134
20175
  content: diff2.content,
20135
- path: diff2.file
20176
+ path: diff2.file,
20177
+ disableMarkdownSyntax: true
20136
20178
  })
20137
20179
  })
20138
20180
  ]
@@ -20175,8 +20217,9 @@ function GitDiffViewer({ diff: diff2 }) {
20175
20217
  children: "No changes to display"
20176
20218
  }) : /* @__PURE__ */ jsx79(CodeMirrorViewer, {
20177
20219
  content: diff2.diff,
20178
- path: "diff.patch",
20179
- lineTones: getDiffLineTones(diff2.diff)
20220
+ path: diff2.file,
20221
+ lineTones: getDiffLineTones(diff2.diff),
20222
+ disableMarkdownSyntax: true
20180
20223
  })
20181
20224
  })
20182
20225
  });
@@ -20436,7 +20479,7 @@ ${file.absPath}`,
20436
20479
  }
20437
20480
 
20438
20481
  // src/components/git/GitFileList.tsx
20439
- import { useEffect as useEffect31, useRef as useRef22, useMemo as useMemo21 } from "react";
20482
+ import { useEffect as useEffect32, useRef as useRef22, useMemo as useMemo21 } from "react";
20440
20483
  import { jsx as jsx81, jsxs as jsxs70 } from "react/jsx-runtime";
20441
20484
  function GitFileList({ status }) {
20442
20485
  const { openCommitModal, openDiff } = useGitStore();
@@ -20470,7 +20513,7 @@ function GitFileList({ status }) {
20470
20513
  }
20471
20514
  };
20472
20515
  const conflictedLength = status.conflicted?.length ?? 0;
20473
- useEffect31(() => {
20516
+ useEffect32(() => {
20474
20517
  if (currentFocus === "git" && gitFileIndex >= 0) {
20475
20518
  const element = itemRefs.current.get(gitFileIndex);
20476
20519
  element?.scrollIntoView({ block: "nearest", behavior: "smooth" });
@@ -20674,7 +20717,7 @@ function GitFileList({ status }) {
20674
20717
  });
20675
20718
  }
20676
20719
  // src/components/git/GitSidebar.tsx
20677
- import { memo as memo22, useCallback as useCallback22, useEffect as useEffect32, useState as useState36 } from "react";
20720
+ import { memo as memo22, useCallback as useCallback22, useEffect as useEffect33, useState as useState36 } from "react";
20678
20721
  import {
20679
20722
  FolderGit2,
20680
20723
  ChevronRight as ChevronRight11,
@@ -20689,7 +20732,7 @@ import {
20689
20732
  Upload,
20690
20733
  X as X12
20691
20734
  } from "lucide-react";
20692
- import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
20735
+ import { useQueryClient as useQueryClient13 } from "@tanstack/react-query";
20693
20736
  import { jsx as jsx82, jsxs as jsxs71, Fragment as Fragment33 } from "react/jsx-runtime";
20694
20737
  var PANEL_KEY = "git";
20695
20738
  var DEFAULT_WIDTH = 320;
@@ -20703,7 +20746,7 @@ var GitSidebar = memo22(function GitSidebar2({
20703
20746
  const panelWidth = usePanelWidthStore((s) => s.widths[PANEL_KEY] ?? DEFAULT_WIDTH);
20704
20747
  const { data: status, isLoading, error, refetch } = useGitStatus();
20705
20748
  const { data: remotes } = useGitRemotes();
20706
- const queryClient = useQueryClient12();
20749
+ const queryClient = useQueryClient13();
20707
20750
  const pushMutation = usePushCommits();
20708
20751
  const pullMutation = usePullChanges();
20709
20752
  const initMutation = useGitInit();
@@ -20716,7 +20759,7 @@ var GitSidebar = memo22(function GitSidebar2({
20716
20759
  const [remoteName, setRemoteName] = useState36("origin");
20717
20760
  const [remoteUrl, setRemoteUrl] = useState36("");
20718
20761
  const [confirmRemoveRemote, setConfirmRemoveRemote] = useState36(null);
20719
- useEffect32(() => {
20762
+ useEffect33(() => {
20720
20763
  if (isExpanded) {
20721
20764
  queryClient.invalidateQueries({ queryKey: ["git", "status"] });
20722
20765
  }
@@ -21231,11 +21274,11 @@ import { GitBranch as GitBranch9 } from "lucide-react";
21231
21274
  import { memo as memo23 } from "react";
21232
21275
 
21233
21276
  // src/hooks/useShortcutHintsVisible.ts
21234
- import { useEffect as useEffect33, useState as useState37 } from "react";
21277
+ import { useEffect as useEffect34, useState as useState37 } from "react";
21235
21278
  var SHORTCUT_HINT_MODIFIERS = new Set(["Control", "Meta"]);
21236
21279
  function useShortcutHintsVisible() {
21237
21280
  const [isVisible, setIsVisible] = useState37(false);
21238
- useEffect33(() => {
21281
+ useEffect34(() => {
21239
21282
  const handleKeyDown = (event) => {
21240
21283
  if (SHORTCUT_HINT_MODIFIERS.has(event.key) || event.ctrlKey || event.metaKey) {
21241
21284
  setIsVisible(true);
@@ -21301,7 +21344,7 @@ var GitSidebarToggle = memo24(function GitSidebarToggle2() {
21301
21344
  });
21302
21345
  });
21303
21346
  // src/components/git/GitDiffPanel.tsx
21304
- import { useEffect as useEffect34, memo as memo25, useState as useState38 } from "react";
21347
+ import { useEffect as useEffect35, memo as memo25, useState as useState38 } from "react";
21305
21348
  import { X as X13, Maximize2, Minimize2 as Minimize22 } from "lucide-react";
21306
21349
 
21307
21350
  // src/hooks/useFileBrowser.ts
@@ -21356,11 +21399,11 @@ var GitDiffPanel = memo25(function GitDiffPanel2({
21356
21399
  const { data: fullFileDiff, isLoading: fullFileLoading } = useGitDiffFullFile(selectedFile, selectedFileStaged, showFullFile);
21357
21400
  const activeDiff = showFullFile && fullFileDiff ? fullFileDiff : diff2;
21358
21401
  const activeLoading = showFullFile ? fullFileLoading : isLoading;
21359
- useEffect34(() => {
21402
+ useEffect35(() => {
21360
21403
  if (!isDiffOpen)
21361
21404
  setShowFullFile(false);
21362
21405
  }, [isDiffOpen]);
21363
- useEffect34(() => {
21406
+ useEffect35(() => {
21364
21407
  const handleEscape = (e) => {
21365
21408
  const target = e.target;
21366
21409
  const isInInput = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable;
@@ -21455,7 +21498,7 @@ ${activeDiff?.absPath || ""}`,
21455
21498
  });
21456
21499
  });
21457
21500
  // src/components/git/GitCommitModal.tsx
21458
- import { useState as useState39, useId as useId2, useEffect as useEffect35, useCallback as useCallback23 } from "react";
21501
+ import { useState as useState39, useId as useId2, useEffect as useEffect36, useCallback as useCallback23 } from "react";
21459
21502
  import { GitCommit as GitCommit4, Sparkles as Sparkles5 } from "lucide-react";
21460
21503
  import { jsx as jsx86, jsxs as jsxs74, Fragment as Fragment34 } from "react/jsx-runtime";
21461
21504
  function GitCommitModal() {
@@ -21488,7 +21531,7 @@ function GitCommitModal() {
21488
21531
  console.error("Failed to generate commit message:", error);
21489
21532
  }
21490
21533
  }, [generateMessage]);
21491
- useEffect35(() => {
21534
+ useEffect36(() => {
21492
21535
  if (!isCommitModalOpen)
21493
21536
  return;
21494
21537
  const handleKeyDown = (e) => {
@@ -21627,7 +21670,7 @@ function GitCommitModal() {
21627
21670
  });
21628
21671
  }
21629
21672
  // src/components/terminals/TerminalsPanel.tsx
21630
- import { memo as memo27, useCallback as useCallback25, useRef as useRef24, useEffect as useEffect37 } from "react";
21673
+ import { memo as memo27, useCallback as useCallback25, useRef as useRef24, useEffect as useEffect38 } from "react";
21631
21674
  import {
21632
21675
  Terminal as TerminalIcon,
21633
21676
  Maximize2 as Maximize22,
@@ -21669,7 +21712,7 @@ var useTerminalStore = create21((set) => ({
21669
21712
  }));
21670
21713
 
21671
21714
  // src/hooks/useTerminals.ts
21672
- import { useQuery as useQuery9, useMutation as useMutation6, useQueryClient as useQueryClient13 } from "@tanstack/react-query";
21715
+ import { useQuery as useQuery9, useMutation as useMutation6, useQueryClient as useQueryClient14 } from "@tanstack/react-query";
21673
21716
  import {
21674
21717
  getTerminals,
21675
21718
  postTerminals,
@@ -21690,7 +21733,7 @@ function useTerminals() {
21690
21733
  });
21691
21734
  }
21692
21735
  function useCreateTerminal() {
21693
- const queryClient = useQueryClient13();
21736
+ const queryClient = useQueryClient14();
21694
21737
  return useMutation6({
21695
21738
  mutationFn: async (params) => {
21696
21739
  const response = await postTerminals({
@@ -21707,7 +21750,7 @@ function useCreateTerminal() {
21707
21750
  });
21708
21751
  }
21709
21752
  function useKillTerminal() {
21710
- const queryClient = useQueryClient13();
21753
+ const queryClient = useQueryClient14();
21711
21754
  return useMutation6({
21712
21755
  mutationFn: async (terminalId) => {
21713
21756
  const response = await deleteTerminalsById({
@@ -21797,7 +21840,7 @@ var TerminalTabBar = memo26(function TerminalTabBar2({
21797
21840
  });
21798
21841
 
21799
21842
  // src/components/terminals/TerminalViewer.tsx
21800
- import { useEffect as useEffect36, useRef as useRef23, useState as useState40, useCallback as useCallback24 } from "react";
21843
+ import { useEffect as useEffect37, useRef as useRef23, useState as useState40, useCallback as useCallback24 } from "react";
21801
21844
  import { init, Terminal as Terminal7, FitAddon } from "ghostty-web";
21802
21845
  import { client as client3 } from "@ottocode/api";
21803
21846
  import { jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
@@ -21962,7 +22005,7 @@ function TerminalViewer({
21962
22005
  }
21963
22006
  };
21964
22007
  }, [terminalId]);
21965
- useEffect36(() => {
22008
+ useEffect37(() => {
21966
22009
  if (!containerRef.current || !terminalId)
21967
22010
  return;
21968
22011
  let disposed = false;
@@ -22132,7 +22175,7 @@ function TerminalViewer({
22132
22175
  fitAddonRef.current = null;
22133
22176
  };
22134
22177
  }, [terminalId, connectWebSocket]);
22135
- useEffect36(() => {
22178
+ useEffect37(() => {
22136
22179
  const term = termRef.current;
22137
22180
  if (!term)
22138
22181
  return;
@@ -22150,7 +22193,7 @@ function TerminalViewer({
22150
22193
  }
22151
22194
  }
22152
22195
  }, [isActive, fitTerminal]);
22153
- useEffect36(() => {
22196
+ useEffect37(() => {
22154
22197
  fitTerminal();
22155
22198
  }, [fitTerminal]);
22156
22199
  return /* @__PURE__ */ jsx88("div", {
@@ -22207,12 +22250,12 @@ var TerminalsPanel = memo27(function TerminalsPanel2() {
22207
22250
  const autoCreatingRef = useRef24(false);
22208
22251
  const terminalsListRef = useRef24(terminalsList);
22209
22252
  terminalsListRef.current = terminalsList;
22210
- useEffect37(() => {
22253
+ useEffect38(() => {
22211
22254
  if (isOpen && terminalsListRef.current.length > 0 && (!activeTabId || !terminalsListRef.current.find((t) => t.id === activeTabId))) {
22212
22255
  selectTab(terminalsListRef.current[0].id);
22213
22256
  }
22214
22257
  }, [isOpen, terminalsList.length, activeTabId, selectTab]);
22215
- useEffect37(() => {
22258
+ useEffect38(() => {
22216
22259
  if (isOpen && terminals && terminalsList.length === 0 && !autoCreatingRef.current && !createTerminal.isPending) {
22217
22260
  autoCreatingRef.current = true;
22218
22261
  createTerminal.mutateAsync({
@@ -22248,7 +22291,7 @@ var TerminalsPanel = memo27(function TerminalsPanel2() {
22248
22291
  }
22249
22292
  } catch {}
22250
22293
  }, [killTerminal, activeTabId, selectTab, closePanel]);
22251
- useEffect37(() => {
22294
+ useEffect38(() => {
22252
22295
  const handleKeyDown = (e) => {
22253
22296
  if (e.key === "`" && e.ctrlKey) {
22254
22297
  e.preventDefault();
@@ -22694,7 +22737,7 @@ var SessionFilesSidebarToggle = memo30(function SessionFilesSidebarToggle2({
22694
22737
  });
22695
22738
  });
22696
22739
  // src/components/session-files/SessionFilesDiffPanel.tsx
22697
- import { useEffect as useEffect38, useMemo as useMemo23, memo as memo31 } from "react";
22740
+ import { useEffect as useEffect39, useMemo as useMemo23, memo as memo31 } from "react";
22698
22741
  import { X as X15, ChevronLeft, ChevronRight as ChevronRight12 } from "lucide-react";
22699
22742
  import { jsx as jsx93, jsxs as jsxs81 } from "react/jsx-runtime";
22700
22743
  function transformToUnifiedDiff(patch) {
@@ -22775,13 +22818,17 @@ function getPatchLineTones(patch) {
22775
22818
  }
22776
22819
  return tones;
22777
22820
  }
22778
- function FullHeightDiffView({ patch }) {
22821
+ function FullHeightDiffView({
22822
+ patch,
22823
+ filePath
22824
+ }) {
22779
22825
  return /* @__PURE__ */ jsx93("div", {
22780
22826
  className: "bg-card/60 border border-border rounded-lg overflow-hidden h-full",
22781
22827
  children: /* @__PURE__ */ jsx93(CodeMirrorViewer, {
22782
22828
  content: patch,
22783
- path: "session.patch",
22784
- lineTones: getPatchLineTones(patch)
22829
+ path: filePath,
22830
+ lineTones: getPatchLineTones(patch),
22831
+ disableMarkdownSyntax: true
22785
22832
  })
22786
22833
  });
22787
22834
  }
@@ -22834,7 +22881,7 @@ ${contentLines.map((line) => `+${line}`).join(`
22834
22881
  }
22835
22882
  return rawPatch;
22836
22883
  }, [selectedOperation, selectedFile]);
22837
- useEffect38(() => {
22884
+ useEffect39(() => {
22838
22885
  const handleKeyDown = (e) => {
22839
22886
  const target = e.target;
22840
22887
  const isInInput = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable;
@@ -22979,7 +23026,8 @@ ${contentLines.map((line) => `+${line}`).join(`
22979
23026
  /* @__PURE__ */ jsx93("div", {
22980
23027
  className: "flex-1 overflow-hidden p-4",
22981
23028
  children: patchContent ? /* @__PURE__ */ jsx93(FullHeightDiffView, {
22982
- patch: patchContent
23029
+ patch: patchContent,
23030
+ filePath: selectedFile
22983
23031
  }) : /* @__PURE__ */ jsx93("div", {
22984
23032
  className: "h-full flex items-center justify-center text-muted-foreground",
22985
23033
  children: "No diff content available"
@@ -22989,7 +23037,7 @@ ${contentLines.map((line) => `+${line}`).join(`
22989
23037
  });
22990
23038
  });
22991
23039
  // src/components/research/ResearchSidebar.tsx
22992
- import { memo as memo32, useState as useState41, useEffect as useEffect39, useCallback as useCallback26, useRef as useRef25, useMemo as useMemo24 } from "react";
23040
+ import { memo as memo32, useState as useState41, useEffect as useEffect40, useCallback as useCallback26, useRef as useRef25, useMemo as useMemo24 } from "react";
22993
23041
  import {
22994
23042
  FlaskConical as FlaskConical3,
22995
23043
  Plus as Plus5,
@@ -23003,7 +23051,7 @@ import {
23003
23051
  } from "lucide-react";
23004
23052
 
23005
23053
  // src/hooks/useResearch.ts
23006
- import { useQuery as useQuery11, useMutation as useMutation7, useQueryClient as useQueryClient14 } from "@tanstack/react-query";
23054
+ import { useQuery as useQuery11, useMutation as useMutation7, useQueryClient as useQueryClient15 } from "@tanstack/react-query";
23007
23055
  import {
23008
23056
  createResearchSession as apiCreateResearchSession,
23009
23057
  deleteResearchSession as apiDeleteResearchSession,
@@ -23066,7 +23114,7 @@ function useResearchSessions(parentSessionId, enabled = true) {
23066
23114
  });
23067
23115
  }
23068
23116
  function useCreateResearchSession() {
23069
- const queryClient = useQueryClient14();
23117
+ const queryClient = useQueryClient15();
23070
23118
  return useMutation7({
23071
23119
  mutationFn: ({
23072
23120
  parentSessionId,
@@ -23080,7 +23128,7 @@ function useCreateResearchSession() {
23080
23128
  });
23081
23129
  }
23082
23130
  function useDeleteResearchSession() {
23083
- const queryClient = useQueryClient14();
23131
+ const queryClient = useQueryClient15();
23084
23132
  return useMutation7({
23085
23133
  mutationFn: (researchId) => researchApi.deleteResearchSession(researchId),
23086
23134
  onSuccess: () => {
@@ -23107,7 +23155,7 @@ function useInjectContext() {
23107
23155
  });
23108
23156
  }
23109
23157
  function useExportToSession() {
23110
- const queryClient = useQueryClient14();
23158
+ const queryClient = useQueryClient15();
23111
23159
  return useMutation7({
23112
23160
  mutationFn: ({
23113
23161
  researchId,
@@ -23120,7 +23168,7 @@ function useExportToSession() {
23120
23168
  }
23121
23169
 
23122
23170
  // src/components/research/ResearchSidebar.tsx
23123
- import { useMutation as useMutation8, useQueryClient as useQueryClient15 } from "@tanstack/react-query";
23171
+ import { useMutation as useMutation8, useQueryClient as useQueryClient16 } from "@tanstack/react-query";
23124
23172
  import { jsx as jsx94, jsxs as jsxs82, Fragment as Fragment36 } from "react/jsx-runtime";
23125
23173
  var PANEL_KEY3 = "research";
23126
23174
  var DEFAULT_WIDTH3 = 384;
@@ -23154,7 +23202,7 @@ var ResearchSidebar = memo32(function ResearchSidebar2({
23154
23202
  const { data: parentMessagesData } = useMessages(parentSessionId ?? undefined, { enabled: isExpanded });
23155
23203
  useSessionStream(activeResearchSessionId ?? undefined, isExpanded);
23156
23204
  const updateSession = useUpdateSession(activeResearchSessionId ?? "");
23157
- const queryClient = useQueryClient15();
23205
+ const queryClient = useQueryClient16();
23158
23206
  const sendMessage = useMutation8({
23159
23207
  mutationFn: async ({
23160
23208
  sessionId,
@@ -23164,12 +23212,12 @@ var ResearchSidebar = memo32(function ResearchSidebar2({
23164
23212
  queryClient.invalidateQueries({ queryKey: ["messages", sessionId] });
23165
23213
  }
23166
23214
  });
23167
- useEffect39(() => {
23215
+ useEffect40(() => {
23168
23216
  if (parentSessionId) {
23169
23217
  useResearchStore.getState().setParentSessionId(parentSessionId);
23170
23218
  }
23171
23219
  }, [parentSessionId]);
23172
- useEffect39(() => {
23220
+ useEffect40(() => {
23173
23221
  if (researchData?.sessions?.length) {
23174
23222
  const currentIsValid = researchData.sessions.some((s) => s.id === activeResearchSessionId);
23175
23223
  if (!currentIsValid) {
@@ -23179,7 +23227,7 @@ var ResearchSidebar = memo32(function ResearchSidebar2({
23179
23227
  selectResearchSession(null);
23180
23228
  }
23181
23229
  }, [researchData, activeResearchSessionId, selectResearchSession]);
23182
- useEffect39(() => {
23230
+ useEffect40(() => {
23183
23231
  messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
23184
23232
  }, []);
23185
23233
  const adjustTextareaHeight = useCallback26(() => {
@@ -23189,7 +23237,7 @@ var ResearchSidebar = memo32(function ResearchSidebar2({
23189
23237
  textarea.style.height = "auto";
23190
23238
  textarea.style.height = `${Math.min(textarea.scrollHeight, 120)}px`;
23191
23239
  }, []);
23192
- useEffect39(() => {
23240
+ useEffect40(() => {
23193
23241
  adjustTextareaHeight();
23194
23242
  }, [adjustTextareaHeight]);
23195
23243
  const handleCreateNew = useCallback26(async () => {
@@ -23683,7 +23731,7 @@ var ResearchSidebarToggle = memo33(function ResearchSidebarToggle2({
23683
23731
  });
23684
23732
  });
23685
23733
  // src/components/settings/SettingsSidebar.tsx
23686
- import { memo as memo34, useState as useState43, useMemo as useMemo25, useCallback as useCallback28, useEffect as useEffect42, useRef as useRef28 } from "react";
23734
+ import { memo as memo34, useState as useState43, useMemo as useMemo25, useCallback as useCallback28, useEffect as useEffect43, useRef as useRef28 } from "react";
23687
23735
  import { createPortal } from "react-dom";
23688
23736
  import {
23689
23737
  Settings as Settings2,
@@ -23744,8 +23792,8 @@ var useOnboardingStore = create22((set, get) => ({
23744
23792
  }));
23745
23793
 
23746
23794
  // src/hooks/useAuthStatus.ts
23747
- import { useEffect as useEffect40, useCallback as useCallback27, useState as useState42, useRef as useRef26 } from "react";
23748
- import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
23795
+ import { useEffect as useEffect41, useCallback as useCallback27, useState as useState42, useRef as useRef26 } from "react";
23796
+ import { useQueryClient as useQueryClient17 } from "@tanstack/react-query";
23749
23797
  var isInIframe = typeof window !== "undefined" && window.self !== window.top;
23750
23798
  function useAuthStatus() {
23751
23799
  const setAuthStatus = useOnboardingStore((s) => s.setAuthStatus);
@@ -23754,7 +23802,7 @@ function useAuthStatus() {
23754
23802
  const setError = useOnboardingStore((s) => s.setError);
23755
23803
  const authStatus = useOnboardingStore((s) => s.authStatus);
23756
23804
  const isOpen = useOnboardingStore((s) => s.isOpen);
23757
- const queryClient = useQueryClient16();
23805
+ const queryClient = useQueryClient17();
23758
23806
  const [initialized, setInitialized] = useState42(false);
23759
23807
  const [oauthPolling, setOauthPolling] = useState42(false);
23760
23808
  const oauthPollingRef = useRef26(null);
@@ -23948,7 +23996,7 @@ function useAuthStatus() {
23948
23996
  setLoading(false);
23949
23997
  }
23950
23998
  }, [fetchAuthStatus, setLoading, setError]);
23951
- useEffect40(() => {
23999
+ useEffect41(() => {
23952
24000
  if (!oauthPolling || !isInIframe)
23953
24001
  return;
23954
24002
  oauthPollingRef.current = setInterval(() => {
@@ -23962,7 +24010,7 @@ function useAuthStatus() {
23962
24010
  clearTimeout(timeout);
23963
24011
  };
23964
24012
  }, [oauthPolling, fetchAuthStatus]);
23965
- useEffect40(() => {
24013
+ useEffect41(() => {
23966
24014
  if (!oauthPolling || !authStatus)
23967
24015
  return;
23968
24016
  const currentConfigured = Object.entries(authStatus.providers).filter(([, p]) => p.configured);
@@ -23971,7 +24019,7 @@ function useAuthStatus() {
23971
24019
  setOauthPolling(false);
23972
24020
  }
23973
24021
  }, [authStatus, oauthPolling]);
23974
- useEffect40(() => {
24022
+ useEffect41(() => {
23975
24023
  const handleOAuthMessage = (event) => {
23976
24024
  if (event.data?.type === "oauth-success") {
23977
24025
  fetchAuthStatus();
@@ -24042,14 +24090,14 @@ function useAuthStatus() {
24042
24090
  }
24043
24091
 
24044
24092
  // src/hooks/useTopupCallback.ts
24045
- import { useEffect as useEffect41, useRef as useRef27 } from "react";
24093
+ import { useEffect as useEffect42, useRef as useRef27 } from "react";
24046
24094
  var STORAGE_KEY2 = "pendingPolarCheckout";
24047
24095
  function useTopupCallback() {
24048
24096
  const hasHandled = useRef27(false);
24049
24097
  const loadingToastId = useRef27(null);
24050
24098
  const setBalance = useOttoRouterStore((s) => s.setBalance);
24051
24099
  const removeToast = useToastStore((s) => s.removeToast);
24052
- useEffect41(() => {
24100
+ useEffect42(() => {
24053
24101
  if (hasHandled.current)
24054
24102
  return;
24055
24103
  const params = new URLSearchParams(window.location.search);
@@ -24243,7 +24291,7 @@ var SelectRow = memo34(function SelectRow2({
24243
24291
  const [menuStyle, setMenuStyle] = useState43(null);
24244
24292
  const buttonRef = useRef28(null);
24245
24293
  const selectedOption = options.find((o) => o.id === value);
24246
- useEffect42(() => {
24294
+ useEffect43(() => {
24247
24295
  if (!isOpen || !buttonRef.current)
24248
24296
  return;
24249
24297
  const update = () => {
@@ -24460,7 +24508,7 @@ var NumberInputRow = memo34(function NumberInputRow2({
24460
24508
  disabled
24461
24509
  }) {
24462
24510
  const [draft, setDraft] = useState43(value !== null && value !== undefined ? String(value) : "");
24463
- useEffect42(() => {
24511
+ useEffect43(() => {
24464
24512
  setDraft(value !== null && value !== undefined ? String(value) : "");
24465
24513
  }, [value]);
24466
24514
  const persistedValue = value !== null && value !== undefined ? String(value) : "";
@@ -25191,8 +25239,8 @@ import {
25191
25239
  import { QRCodeSVG as QRCodeSVG2 } from "qrcode.react";
25192
25240
 
25193
25241
  // src/hooks/useTunnel.ts
25194
- import { useQuery as useQuery12, useMutation as useMutation9, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
25195
- import { useEffect as useEffect43, useCallback as useCallback29, useRef as useRef29 } from "react";
25242
+ import { useQuery as useQuery12, useMutation as useMutation9, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
25243
+ import { useEffect as useEffect44, useCallback as useCallback29, useRef as useRef29 } from "react";
25196
25244
  import {
25197
25245
  client as client4,
25198
25246
  getTunnelQr,
@@ -25235,7 +25283,7 @@ function useTunnelStatus() {
25235
25283
  queryFn: fetchTunnelStatus,
25236
25284
  refetchInterval: 3000
25237
25285
  });
25238
- useEffect43(() => {
25286
+ useEffect44(() => {
25239
25287
  if (query.data) {
25240
25288
  setStatus(query.data.status);
25241
25289
  setUrl(query.data.url);
@@ -25245,7 +25293,7 @@ function useTunnelStatus() {
25245
25293
  return query;
25246
25294
  }
25247
25295
  function useStartTunnel() {
25248
- const queryClient = useQueryClient17();
25296
+ const queryClient = useQueryClient18();
25249
25297
  const setStatus = useTunnelStore((s) => s.setStatus);
25250
25298
  const setUrl = useTunnelStore((s) => s.setUrl);
25251
25299
  const setError = useTunnelStore((s) => s.setError);
@@ -25277,7 +25325,7 @@ function useStartTunnel() {
25277
25325
  });
25278
25326
  }
25279
25327
  function useStopTunnel() {
25280
- const queryClient = useQueryClient17();
25328
+ const queryClient = useQueryClient18();
25281
25329
  const reset = useTunnelStore((s) => s.reset);
25282
25330
  return useMutation9({
25283
25331
  mutationFn: stopTunnel,
@@ -25295,7 +25343,7 @@ function useTunnelQr() {
25295
25343
  queryFn: fetchTunnelQr,
25296
25344
  enabled: !!url
25297
25345
  });
25298
- useEffect43(() => {
25346
+ useEffect44(() => {
25299
25347
  if (query.data?.ok && query.data.qrCode) {
25300
25348
  setQrCode(query.data.qrCode);
25301
25349
  }
@@ -25335,7 +25383,7 @@ function useTunnelStream() {
25335
25383
  eventSourceRef.current = null;
25336
25384
  };
25337
25385
  }, [setStatus, setUrl, setError, setProgress]);
25338
- useEffect43(() => {
25386
+ useEffect44(() => {
25339
25387
  if (isExpanded) {
25340
25388
  const cleanup = connect();
25341
25389
  return cleanup;
@@ -25594,7 +25642,7 @@ var TunnelSidebarToggle = memo37(function TunnelSidebarToggle2() {
25594
25642
  });
25595
25643
  });
25596
25644
  // src/components/mcp/MCPSidebar.tsx
25597
- import { memo as memo40, useState as useState46, useCallback as useCallback32, useMemo as useMemo26, useEffect as useEffect46, useRef as useRef32 } from "react";
25645
+ import { memo as memo40, useState as useState46, useCallback as useCallback32, useMemo as useMemo26, useEffect as useEffect47, useRef as useRef32 } from "react";
25598
25646
  import {
25599
25647
  ChevronDown as ChevronDown12,
25600
25648
  ChevronRight as ChevronRight14,
@@ -25611,11 +25659,11 @@ import {
25611
25659
  Wrench,
25612
25660
  X as X17
25613
25661
  } from "lucide-react";
25614
- import { useQueryClient as useQueryClient19 } from "@tanstack/react-query";
25662
+ import { useQueryClient as useQueryClient20 } from "@tanstack/react-query";
25615
25663
 
25616
25664
  // src/hooks/useMCP.ts
25617
- import { useQuery as useQuery13, useMutation as useMutation10, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
25618
- import { useEffect as useEffect44, useRef as useRef30, useCallback as useCallback30 } from "react";
25665
+ import { useQuery as useQuery13, useMutation as useMutation10, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
25666
+ import { useEffect as useEffect45, useRef as useRef30, useCallback as useCallback30 } from "react";
25619
25667
  import {
25620
25668
  listMcpServers,
25621
25669
  startMcpServer,
@@ -25637,7 +25685,7 @@ function useMCPServers() {
25637
25685
  },
25638
25686
  refetchInterval: 1e4
25639
25687
  });
25640
- useEffect44(() => {
25688
+ useEffect45(() => {
25641
25689
  if (query.data?.servers) {
25642
25690
  setServers(query.data.servers);
25643
25691
  }
@@ -25645,7 +25693,7 @@ function useMCPServers() {
25645
25693
  return query;
25646
25694
  }
25647
25695
  function useStartMCPServer() {
25648
- const queryClient = useQueryClient18();
25696
+ const queryClient = useQueryClient19();
25649
25697
  return useMutation10({
25650
25698
  mutationFn: async (name) => {
25651
25699
  const { data, error } = await startMcpServer({
@@ -25664,7 +25712,7 @@ function useStartMCPServer() {
25664
25712
  });
25665
25713
  }
25666
25714
  function useStopMCPServer() {
25667
- const queryClient = useQueryClient18();
25715
+ const queryClient = useQueryClient19();
25668
25716
  const setLoading = useMCPStore((s) => s.setLoading);
25669
25717
  return useMutation10({
25670
25718
  mutationFn: async (name) => {
@@ -25686,7 +25734,7 @@ function useStopMCPServer() {
25686
25734
  });
25687
25735
  }
25688
25736
  function useAddMCPServer() {
25689
- const queryClient = useQueryClient18();
25737
+ const queryClient = useQueryClient19();
25690
25738
  return useMutation10({
25691
25739
  mutationFn: async (params) => {
25692
25740
  const { data, error } = await addMcpServer({
@@ -25705,7 +25753,7 @@ function useAddMCPServer() {
25705
25753
  });
25706
25754
  }
25707
25755
  function useRemoveMCPServer() {
25708
- const queryClient = useQueryClient18();
25756
+ const queryClient = useQueryClient19();
25709
25757
  return useMutation10({
25710
25758
  mutationFn: async (name) => {
25711
25759
  const { data, error } = await removeMcpServer({
@@ -25724,7 +25772,7 @@ function useRemoveMCPServer() {
25724
25772
  });
25725
25773
  }
25726
25774
  function useAuthenticateMCPServer() {
25727
- const queryClient = useQueryClient18();
25775
+ const queryClient = useQueryClient19();
25728
25776
  return useMutation10({
25729
25777
  mutationFn: async (name) => {
25730
25778
  const { data, error } = await initiateMcpAuth({
@@ -25743,7 +25791,7 @@ function useAuthenticateMCPServer() {
25743
25791
  });
25744
25792
  }
25745
25793
  function useRevokeMCPAuth() {
25746
- const queryClient = useQueryClient18();
25794
+ const queryClient = useQueryClient19();
25747
25795
  return useMutation10({
25748
25796
  mutationFn: async (name) => {
25749
25797
  const { data, error } = await revokeMcpAuth({
@@ -25780,7 +25828,7 @@ function useCopilotDevicePoller() {
25780
25828
  const copilotDevice = useMCPStore((s) => s.copilotDevice);
25781
25829
  const setCopilotDevice = useMCPStore((s) => s.setCopilotDevice);
25782
25830
  const setLoading = useMCPStore((s) => s.setLoading);
25783
- const queryClient = useQueryClient18();
25831
+ const queryClient = useQueryClient19();
25784
25832
  const timerRef = useRef30(null);
25785
25833
  const stopPolling = useCallback30(() => {
25786
25834
  if (timerRef.current) {
@@ -25788,7 +25836,7 @@ function useCopilotDevicePoller() {
25788
25836
  timerRef.current = null;
25789
25837
  }
25790
25838
  }, []);
25791
- useEffect44(() => {
25839
+ useEffect45(() => {
25792
25840
  if (!copilotDevice) {
25793
25841
  stopPolling();
25794
25842
  return;
@@ -25824,7 +25872,7 @@ function useCopilotDevicePoller() {
25824
25872
  }
25825
25873
 
25826
25874
  // src/components/mcp/AddMCPServerModal.tsx
25827
- import { memo as memo38, useState as useState45, useCallback as useCallback31, useRef as useRef31, useEffect as useEffect45 } from "react";
25875
+ import { memo as memo38, useState as useState45, useCallback as useCallback31, useRef as useRef31, useEffect as useEffect46 } from "react";
25828
25876
  import { Globe as Globe5, Laptop, FolderDot, Terminal as Terminal9 } from "lucide-react";
25829
25877
  import { jsx as jsx100, jsxs as jsxs88, Fragment as Fragment39 } from "react/jsx-runtime";
25830
25878
  function parseCommandString(input) {
@@ -25947,7 +25995,7 @@ var AddMCPServerModal = memo38(function AddMCPServerModal2({
25947
25995
  ]);
25948
25996
  const contentRef = useRef31(null);
25949
25997
  const [contentHeight, setContentHeight] = useState45(undefined);
25950
- useEffect45(() => {
25998
+ useEffect46(() => {
25951
25999
  const el = contentRef.current;
25952
26000
  if (!el)
25953
26001
  return;
@@ -26491,7 +26539,7 @@ var MCPServerCard = memo40(function MCPServerCard2({
26491
26539
  function useAuthPoller(name, onAuthenticated) {
26492
26540
  const { data } = useMCPAuthStatus(name);
26493
26541
  const prevAuth = useRef32(false);
26494
- useEffect46(() => {
26542
+ useEffect47(() => {
26495
26543
  if (data?.authenticated && !prevAuth.current) {
26496
26544
  onAuthenticated();
26497
26545
  }
@@ -26517,7 +26565,7 @@ var MCPSidebar = memo40(function MCPSidebar2() {
26517
26565
  const [pollingServer, setPollingServer] = useState46(null);
26518
26566
  const [deleteTarget, setDeleteTarget] = useState46(null);
26519
26567
  const [searchQuery, setSearchQuery] = useState46("");
26520
- const queryClient = useQueryClient19();
26568
+ const queryClient = useQueryClient20();
26521
26569
  const handleAuthCompleted = useCallback32(() => {
26522
26570
  if (pollingServer) {
26523
26571
  setAuthUrl(pollingServer, null);
@@ -26526,7 +26574,7 @@ var MCPSidebar = memo40(function MCPSidebar2() {
26526
26574
  }
26527
26575
  }, [pollingServer, setAuthUrl, queryClient]);
26528
26576
  useAuthPoller(pollingServer, handleAuthCompleted);
26529
- useEffect46(() => {
26577
+ useEffect47(() => {
26530
26578
  for (const name of loading) {
26531
26579
  const server = servers.find((s) => s.name === name);
26532
26580
  if (server?.connected) {
@@ -26823,8 +26871,8 @@ import {
26823
26871
  } from "lucide-react";
26824
26872
 
26825
26873
  // src/hooks/useSkills.ts
26826
- import { useMutation as useMutation11, useQuery as useQuery14, useQueryClient as useQueryClient20 } from "@tanstack/react-query";
26827
- import { useEffect as useEffect47 } from "react";
26874
+ import { useMutation as useMutation11, useQuery as useQuery14, useQueryClient as useQueryClient21 } from "@tanstack/react-query";
26875
+ import { useEffect as useEffect48 } from "react";
26828
26876
  function useSkills() {
26829
26877
  const setSkillsConfig = useSkillsStore((s) => s.setSkillsConfig);
26830
26878
  const query = useQuery14({
@@ -26834,7 +26882,7 @@ function useSkills() {
26834
26882
  },
26835
26883
  refetchInterval: 30000
26836
26884
  });
26837
- useEffect47(() => {
26885
+ useEffect48(() => {
26838
26886
  if (query.data?.items) {
26839
26887
  setSkillsConfig({
26840
26888
  skills: query.data.items,
@@ -26847,7 +26895,7 @@ function useSkills() {
26847
26895
  return query;
26848
26896
  }
26849
26897
  function useUpdateSkillsConfig() {
26850
- const queryClient = useQueryClient20();
26898
+ const queryClient = useQueryClient21();
26851
26899
  const setSkillsConfig = useSkillsStore((s) => s.setSkillsConfig);
26852
26900
  return useMutation11({
26853
26901
  mutationFn: (input) => apiClient.updateSkillsConfig(input),
@@ -27290,7 +27338,7 @@ var SkillsSidebarToggle = memo43(function SkillsSidebarToggle2() {
27290
27338
  });
27291
27339
  });
27292
27340
  // src/components/skills/SkillViewerPanel.tsx
27293
- import { memo as memo44, useEffect as useEffect48 } from "react";
27341
+ import { memo as memo44, useEffect as useEffect49 } from "react";
27294
27342
  import { X as X19 } from "lucide-react";
27295
27343
  import { jsx as jsx106, jsxs as jsxs93 } from "react/jsx-runtime";
27296
27344
  var SkillViewerPanel = memo44(function SkillViewerPanel2({
@@ -27314,7 +27362,7 @@ var SkillViewerPanel = memo44(function SkillViewerPanel2({
27314
27362
  const content = isMainFile ? skillDetail?.content : fileData?.content;
27315
27363
  const isLoading = isMainFile ? !skillDetail : fileLoading;
27316
27364
  const displayPath = isMainFile ? "SKILL.md" : viewingFile ?? "";
27317
- useEffect48(() => {
27365
+ useEffect49(() => {
27318
27366
  const handleEscape = (e) => {
27319
27367
  const target = e.target;
27320
27368
  const isInInput = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable;
@@ -27384,7 +27432,7 @@ var SkillViewerPanel = memo44(function SkillViewerPanel2({
27384
27432
  });
27385
27433
  });
27386
27434
  // src/components/file-browser/FileBrowserSidebar.tsx
27387
- import { memo as memo45, useCallback as useCallback33, useEffect as useEffect49, useRef as useRef33 } from "react";
27435
+ import { memo as memo45, useCallback as useCallback33, useEffect as useEffect50, useRef as useRef33 } from "react";
27388
27436
  import {
27389
27437
  ChevronRight as ChevronRight15,
27390
27438
  ChevronDown as ChevronDown13,
@@ -27453,7 +27501,7 @@ function TreeItem({
27453
27501
  const activeViewerTabPath = getViewerTabPath3(activeViewerTab);
27454
27502
  const isSelected = selectedFile === path || activeViewerTabPath === path;
27455
27503
  const itemRef = useRef33(null);
27456
- useEffect49(() => {
27504
+ useEffect50(() => {
27457
27505
  if (isSelected) {
27458
27506
  itemRef.current?.scrollIntoView({ block: "nearest" });
27459
27507
  }
@@ -27518,7 +27566,7 @@ var FileBrowserSidebar = memo45(function FileBrowserSidebar2() {
27518
27566
  });
27519
27567
  const panelWidth = usePanelWidthStore((s) => s.widths[PANEL_KEY4] ?? DEFAULT_WIDTH4);
27520
27568
  const { data: rootData, isLoading, refetch } = useFileTree(".");
27521
- useEffect49(() => {
27569
+ useEffect50(() => {
27522
27570
  if (isExpanded && activeFileTabPath) {
27523
27571
  revealFile(activeFileTabPath);
27524
27572
  }
@@ -27623,7 +27671,7 @@ var FileBrowserSidebarToggle = memo46(function FileBrowserSidebarToggle2() {
27623
27671
  // src/components/file-browser/FileViewerPanel.tsx
27624
27672
  import {
27625
27673
  memo as memo47,
27626
- useEffect as useEffect51,
27674
+ useEffect as useEffect52,
27627
27675
  useMemo as useMemo29,
27628
27676
  useRef as useRef35
27629
27677
  } from "react";
@@ -27633,7 +27681,7 @@ import remarkGfm3 from "remark-gfm";
27633
27681
 
27634
27682
  // src/components/workspace/ToolPreviewPanel.tsx
27635
27683
  import { CheckCircle2 as CheckCircle22, XCircle as XCircle4 } from "lucide-react";
27636
- import { useEffect as useEffect50, useMemo as useMemo28, useRef as useRef34 } from "react";
27684
+ import { useEffect as useEffect51, useMemo as useMemo28, useRef as useRef34 } from "react";
27637
27685
  import { jsx as jsx109, jsxs as jsxs96 } from "react/jsx-runtime";
27638
27686
  var LARGE_WRITE_PREVIEW_CHARS = 24000;
27639
27687
  var LARGE_WRITE_PREVIEW_LINES = 500;
@@ -28212,7 +28260,8 @@ function PlainSourceViewer({
28212
28260
  }),
28213
28261
  /* @__PURE__ */ jsx109(CodeMirrorViewer, {
28214
28262
  content,
28215
- path
28263
+ path,
28264
+ disableMarkdownSyntax: true
28216
28265
  })
28217
28266
  ]
28218
28267
  });
@@ -28233,7 +28282,8 @@ function SourceViewer({
28233
28282
  highlightTone,
28234
28283
  lineTones,
28235
28284
  scrollToLine,
28236
- scrollToEndSignal
28285
+ scrollToEndSignal,
28286
+ disableMarkdownSyntax: true
28237
28287
  });
28238
28288
  }
28239
28289
  function ToolPreviewPanel({ tab }) {
@@ -28287,7 +28337,7 @@ function ToolPreviewPanel({ tab }) {
28287
28337
  };
28288
28338
  }
28289
28339
  const stablePatchPreview = lastPatchPreviewRef.current?.key === patchPreviewKey ? livePatchPreview ?? lastPatchPreviewRef.current.preview : livePatchPreview ?? persistedPatchPreview;
28290
- useEffect50(() => {
28340
+ useEffect51(() => {
28291
28341
  if (tab.toolName !== "apply_patch" || !livePatchPreview)
28292
28342
  return;
28293
28343
  const baseContent = tab.baseContent ?? appliedFile?.content;
@@ -28312,11 +28362,11 @@ function ToolPreviewPanel({ tab }) {
28312
28362
  error: tab.error
28313
28363
  });
28314
28364
  }, [tab, appliedFile?.content, livePatchPreview]);
28315
- useEffect50(() => {
28365
+ useEffect51(() => {
28316
28366
  if (shouldLoadAppliedFile)
28317
28367
  refetchAppliedFile();
28318
28368
  }, [shouldLoadAppliedFile, refetchAppliedFile]);
28319
- useEffect50(() => {
28369
+ useEffect51(() => {
28320
28370
  if (scrollSignal.length === 0)
28321
28371
  return;
28322
28372
  const frame = window.requestAnimationFrame(() => {
@@ -28539,7 +28589,7 @@ var FileViewerPanel = memo47(function FileViewerPanel2({
28539
28589
  const selectedFile = file ?? storeSelectedFile;
28540
28590
  const closeViewer = onClose ?? storeCloseViewer;
28541
28591
  const { data, isLoading } = useFileContent(selectedFile);
28542
- useEffect51(() => {
28592
+ useEffect52(() => {
28543
28593
  const handleEscape = (e) => {
28544
28594
  const target = e.target;
28545
28595
  const isInInput = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable;
@@ -28566,7 +28616,7 @@ var FileViewerPanel = memo47(function FileViewerPanel2({
28566
28616
  const patchBaseContent = patchPreview ? patchPreview.baseContent ?? data?.content ?? "" : undefined;
28567
28617
  const livePatchPreview = useMemo29(() => selectedFile && patchPreview?.patch && patchBaseContent !== undefined ? buildLivePatchPreview(patchBaseContent, patchPreview.patch, selectedFile) : null, [selectedFile, patchPreview?.patch, patchBaseContent]);
28568
28618
  const activePatchPreview = patchPreview?.status === "success" ? persistedPatchPreview ?? livePatchPreview : livePatchPreview ?? persistedPatchPreview;
28569
- useEffect51(() => {
28619
+ useEffect52(() => {
28570
28620
  if (!selectedFile || !patchPreview || !livePatchPreview)
28571
28621
  return;
28572
28622
  const baseContent = patchPreview.baseContent ?? data?.content;
@@ -28591,7 +28641,7 @@ var FileViewerPanel = memo47(function FileViewerPanel2({
28591
28641
  error: patchPreview.error
28592
28642
  });
28593
28643
  }, [selectedFile, data?.content, patchPreview, livePatchPreview]);
28594
- useEffect51(() => {
28644
+ useEffect52(() => {
28595
28645
  if (!data || !effectiveHighlight?.startLine)
28596
28646
  return;
28597
28647
  const frame = window.requestAnimationFrame(() => {
@@ -28700,12 +28750,14 @@ var FileViewerPanel = memo47(function FileViewerPanel2({
28700
28750
  children: writePreview?.content !== undefined ? /* @__PURE__ */ jsx110(CodeMirrorViewer, {
28701
28751
  content: writePreview.content,
28702
28752
  path: selectedFile,
28703
- lineTones: writePreviewLineTones
28753
+ lineTones: writePreviewLineTones,
28754
+ disableMarkdownSyntax: true
28704
28755
  }) : activePatchPreview ? /* @__PURE__ */ jsx110(CodeMirrorViewer, {
28705
28756
  content: activePatchPreview.content,
28706
28757
  path: selectedFile,
28707
28758
  lineTones: activePatchLineTones,
28708
- scrollToLine: activePatchPreview.latestLine
28759
+ scrollToLine: activePatchPreview.latestLine,
28760
+ disableMarkdownSyntax: true
28709
28761
  }) : isLoading ? /* @__PURE__ */ jsx110("div", {
28710
28762
  className: "h-full flex items-center justify-center text-muted-foreground",
28711
28763
  children: "Loading file..."
@@ -28752,7 +28804,8 @@ var FileViewerPanel = memo47(function FileViewerPanel2({
28752
28804
  path: selectedFile,
28753
28805
  highlightedLines,
28754
28806
  lineTones: persistentLineTones,
28755
- scrollToLine: scrollToHighlightLine
28807
+ scrollToLine: scrollToHighlightLine,
28808
+ disableMarkdownSyntax: isMarkdownFile(selectedFile)
28756
28809
  }) : /* @__PURE__ */ jsx110("div", {
28757
28810
  className: "h-full flex items-center justify-center text-muted-foreground",
28758
28811
  children: "Unable to load file"
@@ -28787,7 +28840,7 @@ var FileViewerPanel = memo47(function FileViewerPanel2({
28787
28840
  });
28788
28841
  });
28789
28842
  // src/components/file-browser/QuickFilePicker.tsx
28790
- import { memo as memo48, useState as useState48, useEffect as useEffect52, useRef as useRef36, useCallback as useCallback34, useMemo as useMemo30 } from "react";
28843
+ import { memo as memo48, useState as useState48, useEffect as useEffect53, useRef as useRef36, useCallback as useCallback34, useMemo as useMemo30 } from "react";
28791
28844
  import { FileCode as FileCode4, Search as Search9 } from "lucide-react";
28792
28845
 
28793
28846
  // src/stores/filePickerStore.ts
@@ -28842,14 +28895,14 @@ var QuickFilePicker = memo48(function QuickFilePicker2() {
28842
28895
  const results = filesData.files.map((file) => ({ file, ...fuzzyMatch(query, file) })).filter((r) => r.match).sort((a, b) => b.score - a.score).slice(0, 50);
28843
28896
  return results.map((r) => r.file);
28844
28897
  }, [filesData?.files, query]);
28845
- useEffect52(() => {
28898
+ useEffect53(() => {
28846
28899
  if (isOpen) {
28847
28900
  setQuery("");
28848
28901
  setSelectedIndex(0);
28849
28902
  setTimeout(() => inputRef.current?.focus(), 0);
28850
28903
  }
28851
28904
  }, [isOpen]);
28852
- useEffect52(() => {
28905
+ useEffect53(() => {
28853
28906
  const item = listRef.current?.children[selectedIndex];
28854
28907
  item?.scrollIntoView({ block: "nearest" });
28855
28908
  }, [selectedIndex]);
@@ -29009,7 +29062,7 @@ function HighlightedPath({ path, query }) {
29009
29062
  // src/components/workspace/ViewerTabs.tsx
29010
29063
  import { Icon, addCollection } from "@iconify/react";
29011
29064
  import { icons as materialIconTheme } from "@iconify-json/material-icon-theme";
29012
- import { memo as memo49, useEffect as useEffect53 } from "react";
29065
+ import { memo as memo49, useEffect as useEffect54 } from "react";
29013
29066
  import { GitCommit as GitCommit5, X as X21 } from "lucide-react";
29014
29067
  import { jsx as jsx112, jsxs as jsxs99 } from "react/jsx-runtime";
29015
29068
  addCollection(materialIconTheme);
@@ -29302,7 +29355,7 @@ var ViewerTabs = memo49(function ViewerTabs2() {
29302
29355
  const setActiveTab = useViewerTabsStore((state) => state.setActiveTab);
29303
29356
  const closeTab = useViewerTabsStore((state) => state.closeTab);
29304
29357
  const updateSessionFileOperationIndex = useViewerTabsStore((state) => state.updateSessionFileOperationIndex);
29305
- useEffect53(() => {
29358
+ useEffect54(() => {
29306
29359
  const handleKeyDown = (event) => {
29307
29360
  const target = event.target;
29308
29361
  const isInInput = target?.tagName === "INPUT" || target?.tagName === "TEXTAREA" || target?.isContentEditable;
@@ -29326,12 +29379,12 @@ var ViewerTabs = memo49(function ViewerTabs2() {
29326
29379
  className: "h-full w-full min-w-0 bg-sidebar flex flex-col",
29327
29380
  children: [
29328
29381
  /* @__PURE__ */ jsxs99("div", {
29329
- className: "h-12 shrink-0 bg-background flex overflow-x-auto overflow-y-hidden",
29382
+ className: "h-12 shrink-0 bg-background flex overflow-x-auto overflow-y-hidden overscroll-x-contain scrollbar-hide",
29330
29383
  children: [
29331
29384
  tabs.map((tab) => {
29332
29385
  const isActive = tab.id === activeTab.id;
29333
29386
  return /* @__PURE__ */ jsxs99("div", {
29334
- className: `group h-12 max-w-56 min-w-0 px-3 border-r border-sidebar-border flex items-center gap-2 text-left transition-colors ${isActive ? "bg-sidebar text-sidebar-foreground" : "border-b bg-background text-muted-foreground/70 hover:text-foreground hover:bg-sidebar-accent/40"}`,
29387
+ className: `group h-12 w-44 max-w-56 shrink-0 px-3 border-r border-sidebar-border flex items-center gap-2 text-left transition-colors ${isActive ? "bg-sidebar text-sidebar-foreground" : "border-b bg-background text-muted-foreground/70 hover:text-foreground hover:bg-sidebar-accent/40"}`,
29335
29388
  title: `${tab.title}
29336
29389
  ${tabKindLabel(tab)}`,
29337
29390
  children: [
@@ -29375,10 +29428,10 @@ ${tabKindLabel(tab)}`,
29375
29428
  });
29376
29429
  });
29377
29430
  // src/components/onboarding/OnboardingModal.tsx
29378
- import { memo as memo52, useEffect as useEffect56 } from "react";
29431
+ import { memo as memo52, useEffect as useEffect57 } from "react";
29379
29432
 
29380
29433
  // src/components/onboarding/steps/ProviderSetupStep.tsx
29381
- import { memo as memo50, useEffect as useEffect54, useState as useState49, useRef as useRef37 } from "react";
29434
+ import { memo as memo50, useEffect as useEffect55, useState as useState49, useRef as useRef37 } from "react";
29382
29435
  import {
29383
29436
  Copy as Copy5,
29384
29437
  Check as Check13,
@@ -29485,34 +29538,34 @@ var ProviderSetupStep = memo50(function ProviderSetupStep2({
29485
29538
  const { fetchBalance } = useOttoRouterBalance("ottorouter");
29486
29539
  const effectivePayg = payg?.effectiveSpendableUsd ?? balance ?? 0;
29487
29540
  const setuStatusLabel = subscription?.active ? `GO ${(subscription.creditsRemaining ?? 0).toFixed(1)} credits` : `$${effectivePayg.toFixed(2)}`;
29488
- useEffect54(() => {
29541
+ useEffect55(() => {
29489
29542
  if (prevTopupModalOpen.current && !isTopupModalOpen) {
29490
29543
  fetchBalance();
29491
29544
  }
29492
29545
  prevTopupModalOpen.current = isTopupModalOpen;
29493
29546
  }, [isTopupModalOpen, fetchBalance]);
29494
- useEffect54(() => {
29547
+ useEffect55(() => {
29495
29548
  if (!authStatus.ottorouter.configured && !isSettingUp) {
29496
29549
  setIsSettingUp(true);
29497
29550
  onSetupWallet().finally(() => setIsSettingUp(false));
29498
29551
  }
29499
29552
  }, [authStatus.ottorouter.configured, onSetupWallet, isSettingUp]);
29500
- useEffect54(() => {
29553
+ useEffect55(() => {
29501
29554
  if (addingProvider && apiKeyInputRef.current) {
29502
29555
  apiKeyInputRef.current.focus();
29503
29556
  }
29504
29557
  }, [addingProvider]);
29505
- useEffect54(() => {
29558
+ useEffect55(() => {
29506
29559
  if (oauthSession && oauthCodeInputRef.current) {
29507
29560
  oauthCodeInputRef.current.focus();
29508
29561
  }
29509
29562
  }, [oauthSession]);
29510
- useEffect54(() => {
29563
+ useEffect55(() => {
29511
29564
  if (isImportModalOpen && importPrivateKeyRef.current) {
29512
29565
  importPrivateKeyRef.current.focus();
29513
29566
  }
29514
29567
  }, [isImportModalOpen]);
29515
- useEffect54(() => {
29568
+ useEffect55(() => {
29516
29569
  if (!copilotPolling || !copilotDevice || !copilotPollFnRef.current)
29517
29570
  return;
29518
29571
  copilotCancelledRef.current = false;
@@ -29810,7 +29863,7 @@ var ProviderSetupStep = memo50(function ProviderSetupStep2({
29810
29863
  setImportWalletError(null);
29811
29864
  setImportPrivateKey("");
29812
29865
  };
29813
- useEffect54(() => {
29866
+ useEffect55(() => {
29814
29867
  const handleNativeBack = (event) => {
29815
29868
  const customEvent = event;
29816
29869
  if (!customEvent.detail || customEvent.detail.handled)
@@ -31000,7 +31053,7 @@ var ProviderSetupStep = memo50(function ProviderSetupStep2({
31000
31053
  });
31001
31054
 
31002
31055
  // src/components/onboarding/steps/DefaultsStep.tsx
31003
- import { memo as memo51, useState as useState50, useEffect as useEffect55, useId as useId3, useRef as useRef38 } from "react";
31056
+ import { memo as memo51, useState as useState50, useEffect as useEffect56, useId as useId3, useRef as useRef38 } from "react";
31004
31057
  import { ArrowLeft, Sparkles as Sparkles9, ChevronDown as ChevronDown14 } from "lucide-react";
31005
31058
  import { jsx as jsx114, jsxs as jsxs101, Fragment as Fragment43 } from "react/jsx-runtime";
31006
31059
  var DefaultsStep = memo51(function DefaultsStep2({
@@ -31023,7 +31076,7 @@ var DefaultsStep = memo51(function DefaultsStep2({
31023
31076
  const modelId = useId3();
31024
31077
  const agentId = useId3();
31025
31078
  const approvalId = useId3();
31026
- useEffect55(() => {
31079
+ useEffect56(() => {
31027
31080
  const loadConfig = async () => {
31028
31081
  try {
31029
31082
  const [configData, modelsData] = await Promise.all([
@@ -31054,7 +31107,7 @@ var DefaultsStep = memo51(function DefaultsStep2({
31054
31107
  };
31055
31108
  loadConfig();
31056
31109
  }, []);
31057
- useEffect55(() => {
31110
+ useEffect56(() => {
31058
31111
  if (config2?.agents?.length) {
31059
31112
  const agents = config2.agents;
31060
31113
  if (!selectedAgent || !agents.includes(selectedAgent)) {
@@ -31062,7 +31115,7 @@ var DefaultsStep = memo51(function DefaultsStep2({
31062
31115
  }
31063
31116
  }
31064
31117
  }, [config2, selectedAgent]);
31065
- useEffect55(() => {
31118
+ useEffect56(() => {
31066
31119
  if (allModels?.[selectedProvider] && hasUserChangedProvider.current) {
31067
31120
  const providerModels = allModels[selectedProvider];
31068
31121
  if (!providerModels.models.some((m) => m.id === selectedModel)) {
@@ -31391,7 +31444,7 @@ var OnboardingModal = memo52(function OnboardingModal2({
31391
31444
  importCopilotTokenFromGh,
31392
31445
  getCopilotDiagnostics
31393
31446
  } = useAuthStatus();
31394
- useEffect56(() => {
31447
+ useEffect57(() => {
31395
31448
  if (!isOpen)
31396
31449
  return;
31397
31450
  const handleNativeBack = (event) => {
@@ -31520,4 +31573,4 @@ export {
31520
31573
  AssistantMessageGroup
31521
31574
  };
31522
31575
 
31523
- //# debugId=4E913F960CF2B78D64756E2164756E21
31576
+ //# debugId=83646DAB6C1728A064756E2164756E21