@ottocode/web-sdk 0.1.268 → 0.1.269
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/file-browser/FileViewerPanel.d.ts +5 -1
- package/dist/components/file-browser/FileViewerPanel.d.ts.map +1 -1
- package/dist/components/git/GitDiffPanel.d.ts +5 -1
- package/dist/components/git/GitDiffPanel.d.ts.map +1 -1
- package/dist/components/git/GitDiffViewer.d.ts.map +1 -1
- package/dist/components/index.js +2162 -1881
- package/dist/components/index.js.map +57 -55
- package/dist/components/mcp/MCPSidebar.d.ts.map +1 -1
- package/dist/components/messages/ActionToolBox.d.ts.map +1 -1
- package/dist/components/messages/CompactActivityGroup.d.ts.map +1 -1
- package/dist/components/messages/MessagePartItem.d.ts.map +1 -1
- package/dist/components/messages/MessageThread.d.ts.map +1 -1
- package/dist/components/messages/UserMessageGroup.d.ts.map +1 -1
- package/dist/components/messages/renderers/DiffView.d.ts.map +1 -1
- package/dist/components/messages/threadDensity.d.ts +9 -0
- package/dist/components/messages/threadDensity.d.ts.map +1 -0
- package/dist/components/onboarding/OnboardingModal.d.ts +2 -0
- package/dist/components/onboarding/OnboardingModal.d.ts.map +1 -1
- package/dist/components/session-files/SessionFilesDiffPanel.d.ts +5 -1
- package/dist/components/session-files/SessionFilesDiffPanel.d.ts.map +1 -1
- package/dist/components/sessions/LeanHeader.d.ts.map +1 -1
- package/dist/components/sessions/SessionHeader.d.ts.map +1 -1
- package/dist/components/settings/SettingsSidebar.d.ts.map +1 -1
- package/dist/components/skills/SkillViewerPanel.d.ts +5 -1
- package/dist/components/skills/SkillViewerPanel.d.ts.map +1 -1
- package/dist/components/skills/SkillsSidebar.d.ts.map +1 -1
- package/dist/components/ui/Toaster.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +158 -14
- package/dist/hooks/index.js.map +11 -8
- package/dist/hooks/useAuthStatus.d.ts.map +1 -1
- package/dist/hooks/useClientEvents.d.ts.map +1 -1
- package/dist/hooks/useContainerWidth.d.ts +7 -0
- package/dist/hooks/useContainerWidth.d.ts.map +1 -0
- package/dist/hooks/usePreferences.d.ts.map +1 -1
- package/dist/index.js +2273 -1918
- package/dist/index.js.map +59 -56
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +54 -1
- package/dist/lib/index.js.map +5 -4
- package/dist/lib/open-url.d.ts.map +1 -1
- package/dist/lib/platform.d.ts +14 -0
- package/dist/lib/platform.d.ts.map +1 -0
- package/dist/stores/index.js.map +2 -2
- package/dist/stores/toastStore.d.ts +1 -0
- package/dist/stores/toastStore.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MCPSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/mcp/MCPSidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MCPSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/mcp/MCPSidebar.tsx"],"names":[],"mappings":"AAuQA,eAAO,MAAM,UAAU,8CAmSrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionToolBox.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ActionToolBox.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionToolBox.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ActionToolBox.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA+JnD,UAAU,kBAAkB;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAqQnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactActivityGroup.d.ts","sourceRoot":"","sources":["../../../src/components/messages/CompactActivityGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,oBAAoB,EAEzB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CompactActivityGroup.d.ts","sourceRoot":"","sources":["../../../src/components/messages/CompactActivityGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,oBAAoB,EAEzB,MAAM,mBAAmB,CAAC;AAO3B,UAAU,yBAAyB;IAClC,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACpC,OAAO,EACP,aAAa,EACb,QAAQ,EACR,SAAS,GACT,EAAE,yBAAyB,2CA0P3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessagePartItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/MessagePartItem.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"MessagePartItem.d.ts","sourceRoot":"","sources":["../../../src/components/messages/MessagePartItem.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA8HnD,UAAU,oBAAoB;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,4DA8e3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageThread.d.ts","sourceRoot":"","sources":["../../../src/components/messages/MessageThread.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageThread.d.ts","sourceRoot":"","sources":["../../../src/components/messages/MessageThread.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAaxD,UAAU,kBAAkB;IAC3B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,aAAa,0DA+XxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMessageGroup.d.ts","sourceRoot":"","sources":["../../../src/components/messages/UserMessageGroup.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAM/C,UAAU,qBAAqB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC;AAeD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"UserMessageGroup.d.ts","sourceRoot":"","sources":["../../../src/components/messages/UserMessageGroup.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAM/C,UAAU,qBAAqB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC;AAeD,eAAO,MAAM,gBAAgB,6DA8S5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffView.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/renderers/DiffView.tsx"],"names":[],"mappings":"AAMA,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;CACd;AAgKD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"DiffView.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/renderers/DiffView.tsx"],"names":[],"mappings":"AAMA,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;CACd;AAgKD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,2CAyHhD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type ThreadDensity = 'normal' | 'compact';
|
|
3
|
+
export declare function ThreadDensityProvider({ density, children, }: {
|
|
4
|
+
density: ThreadDensity;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function useThreadDensity(): ThreadDensity;
|
|
8
|
+
export declare function useIsCompactThread(): boolean;
|
|
9
|
+
//# sourceMappingURL=threadDensity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threadDensity.d.ts","sourceRoot":"","sources":["../../../src/components/messages/threadDensity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAIjD,wBAAgB,qBAAqB,CAAC,EACrC,OAAO,EACP,QAAQ,GACR,EAAE;IACF,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACpB,2CAMA;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingModal.d.ts","sourceRoot":"","sources":["../../../src/components/onboarding/OnboardingModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OnboardingModal.d.ts","sourceRoot":"","sources":["../../../src/components/onboarding/OnboardingModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAOjD,UAAU,oBAAoB;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,4DAyE1B,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface SessionFilesDiffPanelProps {
|
|
2
|
+
mode?: 'overlay' | 'pane';
|
|
3
|
+
}
|
|
4
|
+
export declare const SessionFilesDiffPanel: import("react").NamedExoticComponent<SessionFilesDiffPanelProps>;
|
|
5
|
+
export {};
|
|
2
6
|
//# sourceMappingURL=SessionFilesDiffPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionFilesDiffPanel.d.ts","sourceRoot":"","sources":["../../../src/components/session-files/SessionFilesDiffPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionFilesDiffPanel.d.ts","sourceRoot":"","sources":["../../../src/components/session-files/SessionFilesDiffPanel.tsx"],"names":[],"mappings":"AA0VA,UAAU,0BAA0B;IACnC,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,qBAAqB,kEAsMhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeanHeader.d.ts","sourceRoot":"","sources":["../../../src/components/sessions/LeanHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAuB/C,UAAU,eAAe;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,wBAAgB,UAAU,CAAC,EAC1B,OAAO,EACP,SAAS,EACT,YAAY,EACZ,mBAAmB,GACnB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"LeanHeader.d.ts","sourceRoot":"","sources":["../../../src/components/sessions/LeanHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAuB/C,UAAU,eAAe;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,wBAAgB,UAAU,CAAC,EAC1B,OAAO,EACP,SAAS,EACT,YAAY,EACZ,mBAAmB,GACnB,EAAE,eAAe,2CA+KjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionHeader.d.ts","sourceRoot":"","sources":["../../../src/components/sessions/SessionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionHeader.d.ts","sourceRoot":"","sources":["../../../src/components/sessions/SessionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAkB/C,UAAU,kBAAkB;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,wBAAgB,aAAa,CAAC,EAC7B,OAAO,EACP,mBAAmB,GACnB,EAAE,kBAAkB,2CAgMpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/settings/SettingsSidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingsSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/settings/SettingsSidebar.tsx"],"names":[],"mappings":"AAoqBA,eAAO,MAAM,eAAe,8CA+L1B,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface SkillViewerPanelProps {
|
|
2
|
+
mode?: 'overlay' | 'pane';
|
|
3
|
+
}
|
|
4
|
+
export declare const SkillViewerPanel: import("react").NamedExoticComponent<SkillViewerPanelProps>;
|
|
5
|
+
export {};
|
|
2
6
|
//# sourceMappingURL=SkillViewerPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillViewerPanel.d.ts","sourceRoot":"","sources":["../../../src/components/skills/SkillViewerPanel.tsx"],"names":[],"mappings":"AAgDA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SkillViewerPanel.d.ts","sourceRoot":"","sources":["../../../src/components/skills/SkillViewerPanel.tsx"],"names":[],"mappings":"AAgDA,UAAU,qBAAqB;IAC9B,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,6DAuH3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillsSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/skills/SkillsSidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SkillsSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/skills/SkillsSidebar.tsx"],"names":[],"mappings":"AA8CA,eAAO,MAAM,aAAa,8CAkRxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Toaster.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Toaster.tsx"],"names":[],"mappings":"AAyKA,wBAAgB,OAAO,4CAYtB"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1007,6 +1007,55 @@ function useUpdateDefaults() {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
// src/hooks/usePreferences.ts
|
|
1009
1009
|
import { useCallback, useMemo, useSyncExternalStore } from "react";
|
|
1010
|
+
|
|
1011
|
+
// src/lib/platform.ts
|
|
1012
|
+
function getPlatformWindow() {
|
|
1013
|
+
if (typeof window === "undefined")
|
|
1014
|
+
return null;
|
|
1015
|
+
return window;
|
|
1016
|
+
}
|
|
1017
|
+
function openPlatformUrl(url) {
|
|
1018
|
+
const win = getPlatformWindow();
|
|
1019
|
+
if (!win?.OTTO_OPEN_URL)
|
|
1020
|
+
return false;
|
|
1021
|
+
win.OTTO_OPEN_URL(url);
|
|
1022
|
+
return true;
|
|
1023
|
+
}
|
|
1024
|
+
function showPlatformNotification(notification) {
|
|
1025
|
+
const win = getPlatformWindow();
|
|
1026
|
+
if (!win?.OTTO_SHOW_NOTIFICATION)
|
|
1027
|
+
return false;
|
|
1028
|
+
win.OTTO_SHOW_NOTIFICATION(notification);
|
|
1029
|
+
return true;
|
|
1030
|
+
}
|
|
1031
|
+
function listPlatformSystemFonts() {
|
|
1032
|
+
const win = getPlatformWindow();
|
|
1033
|
+
if (!win?.OTTO_LIST_SYSTEM_FONTS)
|
|
1034
|
+
return null;
|
|
1035
|
+
return win.OTTO_LIST_SYSTEM_FONTS();
|
|
1036
|
+
}
|
|
1037
|
+
function notifyPlatformFontFamilyChanged(fontFamily) {
|
|
1038
|
+
const win = getPlatformWindow();
|
|
1039
|
+
if (!win?.OTTO_SET_DESKTOP_FONT)
|
|
1040
|
+
return false;
|
|
1041
|
+
win.OTTO_SET_DESKTOP_FONT(fontFamily);
|
|
1042
|
+
return true;
|
|
1043
|
+
}
|
|
1044
|
+
function openPlatformSession(sessionId) {
|
|
1045
|
+
const win = getPlatformWindow();
|
|
1046
|
+
if (!win?.OTTO_OPEN_SESSION)
|
|
1047
|
+
return false;
|
|
1048
|
+
win.OTTO_OPEN_SESSION(sessionId);
|
|
1049
|
+
return true;
|
|
1050
|
+
}
|
|
1051
|
+
function hasPlatformOpenUrl() {
|
|
1052
|
+
return !!getPlatformWindow()?.OTTO_OPEN_URL;
|
|
1053
|
+
}
|
|
1054
|
+
function hasPlatformSystemFonts() {
|
|
1055
|
+
return !!getPlatformWindow()?.OTTO_LIST_SYSTEM_FONTS;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
// src/hooks/usePreferences.ts
|
|
1010
1059
|
var STORAGE_KEY = "otto-preferences";
|
|
1011
1060
|
var DEFAULT_FONT_FAMILY = "IBM Plex Mono";
|
|
1012
1061
|
var DEFAULT_STORED_PREFERENCES = {
|
|
@@ -1027,6 +1076,9 @@ function applyFontFamily(fontFamily) {
|
|
|
1027
1076
|
}
|
|
1028
1077
|
document.documentElement.style.setProperty("--otto-font-family", cssFontFamily(fontFamily));
|
|
1029
1078
|
document.documentElement.dataset.ottoFontFamily = fontFamily;
|
|
1079
|
+
if (notifyPlatformFontFamilyChanged(fontFamily)) {
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1030
1082
|
if (window.self !== window.top) {
|
|
1031
1083
|
window.parent.postMessage({ type: "otto-font-family-changed", fontFamily }, "*");
|
|
1032
1084
|
}
|
|
@@ -2712,6 +2764,18 @@ toast.successWithAction = (message, action, duration = 6000) => {
|
|
|
2712
2764
|
return id;
|
|
2713
2765
|
};
|
|
2714
2766
|
|
|
2767
|
+
// src/lib/open-url.ts
|
|
2768
|
+
function openUrl(url) {
|
|
2769
|
+
if (openPlatformUrl(url)) {
|
|
2770
|
+
return;
|
|
2771
|
+
}
|
|
2772
|
+
if (window.self !== window.top) {
|
|
2773
|
+
window.parent.postMessage({ type: "otto-open-url", url }, "*");
|
|
2774
|
+
} else {
|
|
2775
|
+
window.open(url, "_blank", "noopener,noreferrer");
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2715
2779
|
// src/hooks/useClientEvents.ts
|
|
2716
2780
|
function toastTypeForLevel(level) {
|
|
2717
2781
|
if (level === "success")
|
|
@@ -2720,39 +2784,87 @@ function toastTypeForLevel(level) {
|
|
|
2720
2784
|
return "error";
|
|
2721
2785
|
return "default";
|
|
2722
2786
|
}
|
|
2787
|
+
function notificationTargetHref(notification) {
|
|
2788
|
+
return notification.action?.href ?? (notification.sessionId ? `/sessions/${encodeURIComponent(notification.sessionId)}` : undefined);
|
|
2789
|
+
}
|
|
2790
|
+
function openNotificationTarget(notification) {
|
|
2791
|
+
const href = notificationTargetHref(notification);
|
|
2792
|
+
if (!href || typeof window === "undefined")
|
|
2793
|
+
return;
|
|
2794
|
+
if (notification.sessionId && openPlatformSession(notification.sessionId)) {
|
|
2795
|
+
return;
|
|
2796
|
+
}
|
|
2797
|
+
if (href.startsWith("/")) {
|
|
2798
|
+
window.location.href = href;
|
|
2799
|
+
return;
|
|
2800
|
+
}
|
|
2801
|
+
openUrl(href);
|
|
2802
|
+
}
|
|
2803
|
+
function requestNotificationPermission() {
|
|
2804
|
+
return new Promise((resolve) => {
|
|
2805
|
+
let settled = false;
|
|
2806
|
+
const finish = (permission) => {
|
|
2807
|
+
if (settled)
|
|
2808
|
+
return;
|
|
2809
|
+
settled = true;
|
|
2810
|
+
setTimeout(() => resolve(permission ?? Notification.permission), 100);
|
|
2811
|
+
};
|
|
2812
|
+
try {
|
|
2813
|
+
const result = Notification.requestPermission(finish);
|
|
2814
|
+
if (result && typeof result.then === "function") {
|
|
2815
|
+
result.then(finish).catch(() => finish());
|
|
2816
|
+
}
|
|
2817
|
+
} catch {
|
|
2818
|
+
finish();
|
|
2819
|
+
}
|
|
2820
|
+
setTimeout(() => finish(), 1500);
|
|
2821
|
+
});
|
|
2822
|
+
}
|
|
2723
2823
|
function showInAppNotification(notification) {
|
|
2724
2824
|
const message = notification.body ? `${notification.title}: ${notification.body}` : notification.title;
|
|
2725
|
-
|
|
2825
|
+
const targetHref = notificationTargetHref(notification);
|
|
2826
|
+
if (targetHref) {
|
|
2726
2827
|
const id = toast(message, toastTypeForLevel(notification.level), 6000);
|
|
2727
|
-
useToastStore.getState().updateToast(id, {
|
|
2828
|
+
useToastStore.getState().updateToast(id, {
|
|
2829
|
+
activateActionOnClick: true,
|
|
2830
|
+
action: notification.action ? {
|
|
2831
|
+
...notification.action,
|
|
2832
|
+
onClick: () => openNotificationTarget(notification)
|
|
2833
|
+
} : {
|
|
2834
|
+
label: "Open session",
|
|
2835
|
+
onClick: () => openNotificationTarget(notification)
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2728
2838
|
return;
|
|
2729
2839
|
}
|
|
2730
2840
|
toast(message, toastTypeForLevel(notification.level), 5000);
|
|
2731
2841
|
}
|
|
2732
2842
|
function sendBrowserNotification(notification) {
|
|
2733
2843
|
if (typeof window === "undefined")
|
|
2734
|
-
return;
|
|
2844
|
+
return false;
|
|
2845
|
+
if (showPlatformNotification(notification))
|
|
2846
|
+
return true;
|
|
2735
2847
|
if (window.parent && window.parent !== window) {
|
|
2736
2848
|
const message = {
|
|
2737
2849
|
type: "otto-notification",
|
|
2738
2850
|
notification
|
|
2739
2851
|
};
|
|
2740
2852
|
window.parent.postMessage(message, "*");
|
|
2741
|
-
return;
|
|
2853
|
+
return true;
|
|
2742
2854
|
}
|
|
2743
2855
|
if (!("Notification" in window) || Notification.permission !== "granted")
|
|
2744
|
-
return;
|
|
2856
|
+
return false;
|
|
2745
2857
|
const browserNotification = new Notification(notification.title, {
|
|
2746
2858
|
body: notification.body,
|
|
2747
|
-
tag: notification.id
|
|
2859
|
+
tag: notification.id,
|
|
2860
|
+
data: { href: notificationTargetHref(notification) }
|
|
2748
2861
|
});
|
|
2749
2862
|
browserNotification.onclick = () => {
|
|
2750
2863
|
window.focus();
|
|
2751
|
-
|
|
2752
|
-
window.location.href = `/sessions/${notification.sessionId}`;
|
|
2753
|
-
}
|
|
2864
|
+
openNotificationTarget(notification);
|
|
2754
2865
|
browserNotification.close();
|
|
2755
2866
|
};
|
|
2867
|
+
return true;
|
|
2756
2868
|
}
|
|
2757
2869
|
function updateSessionStatusInCache(queryClient, status) {
|
|
2758
2870
|
queryClient.setQueryData(sessionsQueryKey, (old) => {
|
|
@@ -2809,8 +2921,9 @@ function useClientEvents(activeSessionId) {
|
|
|
2809
2921
|
action: {
|
|
2810
2922
|
label: "Enable",
|
|
2811
2923
|
onClick: async () => {
|
|
2812
|
-
const permission = await
|
|
2813
|
-
|
|
2924
|
+
const permission = await requestNotificationPermission();
|
|
2925
|
+
const currentPermission = Notification.permission;
|
|
2926
|
+
if (permission === "granted" || currentPermission === "granted") {
|
|
2814
2927
|
toast.success("Browser notifications enabled.");
|
|
2815
2928
|
} else {
|
|
2816
2929
|
toast.info("Browser notifications were not enabled.");
|
|
@@ -2847,10 +2960,14 @@ function useClientEvents(activeSessionId) {
|
|
|
2847
2960
|
}
|
|
2848
2961
|
if (event.event === "notification") {
|
|
2849
2962
|
const notification = payload;
|
|
2850
|
-
showInAppNotification(notification);
|
|
2851
2963
|
const isActiveVisibleSession = notification.sessionId === activeSessionIdRef.current && document.visibilityState === "visible";
|
|
2964
|
+
const isSessionNotification = notification.source === "session" || !!notification.sessionId;
|
|
2965
|
+
let sentSystemNotification = false;
|
|
2852
2966
|
if (!isActiveVisibleSession) {
|
|
2853
|
-
sendBrowserNotification(notification);
|
|
2967
|
+
sentSystemNotification = sendBrowserNotification(notification);
|
|
2968
|
+
}
|
|
2969
|
+
if (!isSessionNotification || !sentSystemNotification && !isActiveVisibleSession) {
|
|
2970
|
+
showInAppNotification(notification);
|
|
2854
2971
|
}
|
|
2855
2972
|
}
|
|
2856
2973
|
},
|
|
@@ -4626,6 +4743,11 @@ function useAuthStatus() {
|
|
|
4626
4743
|
}, []);
|
|
4627
4744
|
const startOAuth = useCallback8((provider, mode) => {
|
|
4628
4745
|
const url = apiClient.getOAuthStartUrl(provider, mode);
|
|
4746
|
+
if (openPlatformUrl(url)) {
|
|
4747
|
+
snapshotConfiguredProviders();
|
|
4748
|
+
setOauthPolling(true);
|
|
4749
|
+
return null;
|
|
4750
|
+
}
|
|
4629
4751
|
if (isInIframe) {
|
|
4630
4752
|
snapshotConfiguredProviders();
|
|
4631
4753
|
window.parent.postMessage({ type: "otto-open-url", url }, "*");
|
|
@@ -4641,6 +4763,11 @@ function useAuthStatus() {
|
|
|
4641
4763
|
}, [snapshotConfiguredProviders]);
|
|
4642
4764
|
const startOAuthManual = useCallback8(async (provider, mode) => {
|
|
4643
4765
|
const { url, sessionId } = await apiClient.getOAuthUrl(provider, mode);
|
|
4766
|
+
if (openPlatformUrl(url)) {
|
|
4767
|
+
snapshotConfiguredProviders();
|
|
4768
|
+
setOauthPolling(true);
|
|
4769
|
+
return { popup: null, sessionId };
|
|
4770
|
+
}
|
|
4644
4771
|
if (isInIframe) {
|
|
4645
4772
|
snapshotConfiguredProviders();
|
|
4646
4773
|
window.parent.postMessage({ type: "otto-open-url", url }, "*");
|
|
@@ -5276,6 +5403,22 @@ function useSkillFileContent(name, filePath) {
|
|
|
5276
5403
|
enabled: !!name && !!filePath
|
|
5277
5404
|
});
|
|
5278
5405
|
}
|
|
5406
|
+
// src/hooks/useContainerWidth.ts
|
|
5407
|
+
import { useEffect as useEffect17, useState as useState6 } from "react";
|
|
5408
|
+
function useContainerWidth(ref) {
|
|
5409
|
+
const [width, setWidth] = useState6(0);
|
|
5410
|
+
useEffect17(() => {
|
|
5411
|
+
const el = ref.current;
|
|
5412
|
+
if (!el)
|
|
5413
|
+
return;
|
|
5414
|
+
const update = () => setWidth(el.clientWidth);
|
|
5415
|
+
update();
|
|
5416
|
+
const observer = new ResizeObserver(() => update());
|
|
5417
|
+
observer.observe(el);
|
|
5418
|
+
return () => observer.disconnect();
|
|
5419
|
+
}, [ref]);
|
|
5420
|
+
return width;
|
|
5421
|
+
}
|
|
5279
5422
|
export {
|
|
5280
5423
|
useWorkingDirectory,
|
|
5281
5424
|
useUpdateSkillsConfig,
|
|
@@ -5344,6 +5487,7 @@ export {
|
|
|
5344
5487
|
useCreateResearchSession,
|
|
5345
5488
|
useCreateBranch,
|
|
5346
5489
|
useCopilotDevicePoller,
|
|
5490
|
+
useContainerWidth,
|
|
5347
5491
|
useConfig,
|
|
5348
5492
|
useCommitChanges,
|
|
5349
5493
|
useClientEvents,
|
|
@@ -5356,4 +5500,4 @@ export {
|
|
|
5356
5500
|
sessionsQueryKey
|
|
5357
5501
|
};
|
|
5358
5502
|
|
|
5359
|
-
//# debugId=
|
|
5503
|
+
//# debugId=5F8DA6B0D961E4EF64756E2164756E21
|