@ottocode/web-sdk 0.1.290 → 0.1.291

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 +1 @@
1
- {"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatInput.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAsCzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAkChE,UAAU,cAAc;IACvB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,C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EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,uBAAuB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,SAAS;WAEX,MAAM,IAAI;cAAY,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;GAojCvD,CAAC"}
@@ -3138,12 +3138,12 @@ var SHORTCUTS = [
3138
3138
  category: "Chat"
3139
3139
  },
3140
3140
  {
3141
- keys: ["Fn", "hold"],
3141
+ keys: ["Globe", "hold"],
3142
3142
  description: "Record voice while held",
3143
3143
  category: "Chat"
3144
3144
  },
3145
3145
  {
3146
- keys: ["Fn", "Fn"],
3146
+ keys: ["Globe", "Globe"],
3147
3147
  description: "Toggle hands-free voice recording",
3148
3148
  category: "Chat"
3149
3149
  },
@@ -6722,8 +6722,8 @@ var DictationInstallPrompt = memo6(function DictationInstallPrompt2({
6722
6722
  // src/components/chat/ChatInput.tsx
6723
6723
  import { jsx as jsx22, jsxs as jsxs15, Fragment as Fragment4 } from "react/jsx-runtime";
6724
6724
  var VOICE_SHORTCUT_DOUBLE_PRESS_WINDOW_MS = 280;
6725
- function isFunctionKeyEvent(event) {
6726
- return event.key === "Fn" || event.key === "Function" || event.code === "Fn" || event.code === "Function";
6725
+ function isGlobeKeyEvent(event) {
6726
+ return event.key === "Globe" || event.key === "Fn" || event.key === "Function" || event.code === "Globe" || event.code === "Fn" || event.code === "Function" || event.keyCode === 63 || event.which === 63;
6727
6727
  }
6728
6728
  function isWebVoiceShortcutDown(event) {
6729
6729
  return event.code === "Space" && (event.ctrlKey || event.altKey);
@@ -6883,6 +6883,7 @@ var ChatInput = memo7(forwardRef5(function ChatInput2({
6883
6883
  ]);
6884
6884
  const { status: dictationStatus } = useDictationModels();
6885
6885
  const voiceBaseTextRef = useRef7("");
6886
+ const shouldFocusAfterDictationRef = useRef7(false);
6886
6887
  const {
6887
6888
  isListening,
6888
6889
  isTranscribing,
@@ -6902,9 +6903,18 @@ var ChatInput = memo7(forwardRef5(function ChatInput2({
6902
6903
  return;
6903
6904
  }
6904
6905
  setMessage(nextMessage);
6906
+ if (isFinal) {
6907
+ shouldFocusAfterDictationRef.current = true;
6908
+ }
6905
6909
  }
6906
6910
  });
6907
6911
  const isVoiceActive = isListening || isTranscribing;
6912
+ useEffect14(() => {
6913
+ if (isVoiceActive || !shouldFocusAfterDictationRef.current)
6914
+ return;
6915
+ shouldFocusAfterDictationRef.current = false;
6916
+ textareaRef.current?.focus({ preventScroll: true });
6917
+ }, [isVoiceActive]);
6908
6918
  const defaultDictationModel = dictationStatus?.models.find((model) => model.id === dictationStatus.defaultModel);
6909
6919
  const handleStartVoice = useCallback13(() => {
6910
6920
  setVoiceShortcutMode(null);
@@ -7037,19 +7047,19 @@ var ChatInput = memo7(forwardRef5(function ChatInput2({
7037
7047
  fnStopRequestedRef.current = true;
7038
7048
  };
7039
7049
  const handleKeyDown2 = (event) => {
7040
- const isFnShortcut = isFunctionKeyEvent(event);
7050
+ const isGlobeShortcut = isGlobeKeyEvent(event);
7041
7051
  const isWebShortcut = isWebVoiceShortcutDown(event);
7042
- if (!isFnShortcut && !isWebShortcut)
7052
+ if (!isGlobeShortcut && !isWebShortcut)
7043
7053
  return;
7044
7054
  event.preventDefault();
7045
7055
  event.stopPropagation();
7046
7056
  if (event.repeat)
7047
7057
  return;
7048
- startShortcutPress(isFnShortcut ? "fn" : "web");
7058
+ startShortcutPress(isGlobeShortcut ? "fn" : "web");
7049
7059
  };
7050
7060
  const handleKeyUp = (event) => {
7051
7061
  const shortcutKind = voiceShortcutKindRef.current;
7052
- const isCurrentShortcut = shortcutKind === "fn" && isFunctionKeyEvent(event) || shortcutKind === "web" && isWebVoiceShortcutUp(event);
7062
+ const isCurrentShortcut = shortcutKind === "fn" && isGlobeKeyEvent(event) || shortcutKind === "web" && isWebVoiceShortcutUp(event);
7053
7063
  if (!isCurrentShortcut)
7054
7064
  return;
7055
7065
  event.preventDefault();
@@ -30293,18 +30303,22 @@ var ToggleSwitch = memo41(function ToggleSwitch2({
30293
30303
  role: "switch",
30294
30304
  "aria-checked": checked,
30295
30305
  disabled: disabled || loading,
30306
+ onPointerDown: (event) => event.stopPropagation(),
30296
30307
  onClick: (event) => {
30297
30308
  event.stopPropagation();
30298
30309
  onChange();
30299
30310
  },
30300
- className: `relative inline-flex h-5 w-9 flex-shrink-0 items-center rounded-full transition-colors duration-200 focus-visible:outline-none disabled:opacity-50 disabled:cursor-not-allowed ${checked ? "bg-green-500" : "bg-muted-foreground/30"}`,
30311
+ className: "relative -m-2 inline-flex h-9 w-[52px] flex-shrink-0 items-center justify-center rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
30301
30312
  children: /* @__PURE__ */ jsx114("span", {
30302
- className: `inline-block h-3.5 w-3.5 rounded-full transition-transform duration-200 ${checked ? "translate-x-[18px]" : "translate-x-[3px]"} ${loading ? "bg-transparent" : "bg-white"}`,
30303
- children: loading ? /* @__PURE__ */ jsx114(StableSpinner, {
30304
- size: "sm",
30305
- className: "text-white",
30306
- title: "Updating"
30307
- }) : null
30313
+ className: `relative inline-flex h-5 w-9 items-center rounded-full transition-colors duration-200 ${checked ? "bg-green-500" : "bg-muted-foreground/30"}`,
30314
+ children: /* @__PURE__ */ jsx114("span", {
30315
+ className: `inline-block h-3.5 w-3.5 rounded-full transition-transform duration-200 ${checked ? "translate-x-[18px]" : "translate-x-[3px]"} ${loading ? "bg-transparent" : "bg-white"}`,
30316
+ children: loading ? /* @__PURE__ */ jsx114(StableSpinner, {
30317
+ size: "sm",
30318
+ className: "text-white",
30319
+ title: "Updating"
30320
+ }) : null
30321
+ })
30308
30322
  })
30309
30323
  });
30310
30324
  });
@@ -31164,26 +31178,31 @@ var SkillsSidebar = memo44(function SkillsSidebar2() {
31164
31178
  SCOPE_LABELS[scope] ?? scope
31165
31179
  ]
31166
31180
  }),
31167
- scopeSkills.map((skill) => /* @__PURE__ */ jsx117("button", {
31168
- type: "button",
31169
- onClick: () => selectSkill(skill.name),
31170
- className: `w-full text-left px-3 py-2 hover:bg-accent transition-colors ${selectedSkill === skill.name ? "bg-accent" : ""}`,
31181
+ scopeSkills.map((skill) => /* @__PURE__ */ jsx117("div", {
31182
+ className: `w-full px-3 py-2 hover:bg-accent transition-colors ${selectedSkill === skill.name ? "bg-accent" : ""}`,
31171
31183
  children: /* @__PURE__ */ jsxs102("div", {
31172
31184
  className: "flex items-start gap-2",
31173
31185
  children: [
31174
- /* @__PURE__ */ jsx117(FileText7, {
31175
- className: "w-3.5 h-3.5 flex-shrink-0 text-muted-foreground"
31176
- }),
31177
- /* @__PURE__ */ jsxs102("div", {
31178
- className: "min-w-0 flex-1",
31186
+ /* @__PURE__ */ jsxs102("button", {
31187
+ type: "button",
31188
+ onClick: () => selectSkill(skill.name),
31189
+ className: "flex min-w-0 flex-1 cursor-pointer items-start gap-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
31179
31190
  children: [
31180
- /* @__PURE__ */ jsx117("div", {
31181
- className: "text-sm font-medium truncate",
31182
- children: skill.name
31191
+ /* @__PURE__ */ jsx117(FileText7, {
31192
+ className: "w-3.5 h-3.5 flex-shrink-0 text-muted-foreground"
31183
31193
  }),
31184
- /* @__PURE__ */ jsx117("div", {
31185
- className: "text-xs text-muted-foreground truncate",
31186
- children: skill.description
31194
+ /* @__PURE__ */ jsxs102("div", {
31195
+ className: "min-w-0 flex-1",
31196
+ children: [
31197
+ /* @__PURE__ */ jsx117("div", {
31198
+ className: "text-sm font-medium truncate",
31199
+ children: skill.name
31200
+ }),
31201
+ /* @__PURE__ */ jsx117("div", {
31202
+ className: "text-xs text-muted-foreground truncate",
31203
+ children: skill.description
31204
+ })
31205
+ ]
31187
31206
  })
31188
31207
  ]
31189
31208
  }),
@@ -33995,6 +34014,19 @@ var ViewerTabs = memo52(function ViewerTabs2() {
33995
34014
  ]
33996
34015
  })
33997
34016
  }),
34017
+ /* @__PURE__ */ jsx128("div", {
34018
+ className: "h-12 w-12 shrink-0 border-r border-b border-sidebar-border bg-background flex items-stretch",
34019
+ children: /* @__PURE__ */ jsx128("button", {
34020
+ type: "button",
34021
+ onClick: closeAllTabs,
34022
+ title: "Close all tabs and collapse viewer",
34023
+ "aria-label": "Close all tabs and collapse viewer",
34024
+ className: "h-full w-full inline-flex items-center justify-center rounded-none text-muted-foreground/70 transition-colors hover:bg-destructive/10 hover:text-destructive active:translate-y-0 active:scale-100",
34025
+ children: /* @__PURE__ */ jsx128(X24, {
34026
+ className: "h-3.5 w-3.5"
34027
+ })
34028
+ })
34029
+ }),
33998
34030
  /* @__PURE__ */ jsxs111("div", {
33999
34031
  className: "h-12 min-w-0 flex-1 flex overflow-x-auto overflow-y-hidden overscroll-x-contain scrollbar-hide",
34000
34032
  children: [
@@ -34036,19 +34068,6 @@ ${tabKindLabel(tab)}`,
34036
34068
  }),
34037
34069
  /* @__PURE__ */ jsx128("div", {
34038
34070
  className: "min-w-8 flex-1 border-b border-sidebar-border bg-background"
34039
- }),
34040
- /* @__PURE__ */ jsx128("div", {
34041
- className: "h-12 shrink-0 border-b border-l border-sidebar-border bg-background flex items-center px-1.5",
34042
- children: /* @__PURE__ */ jsx128("button", {
34043
- type: "button",
34044
- onClick: closeAllTabs,
34045
- title: "Close all tabs and collapse viewer",
34046
- "aria-label": "Close all tabs and collapse viewer",
34047
- className: "h-8 w-8 inline-flex items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-destructive/10 hover:text-destructive",
34048
- children: /* @__PURE__ */ jsx128(X24, {
34049
- className: "h-3.5 w-3.5"
34050
- })
34051
- })
34052
34071
  })
34053
34072
  ]
34054
34073
  })
@@ -37512,4 +37531,4 @@ export {
37512
37531
  AssistantMessageGroup
37513
37532
  };
37514
37533
 
37515
- //# debugId=EAA206C5BB2CCB2564756E2164756E21
37534
+ //# debugId=08169E127AA52CE964756E2164756E21