@kortix/ui 0.15.7 → 0.15.9
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/README.md +7 -7
- package/dist/_vendor/kortix-shared.js +39 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +7 -0
- package/dist/_vendor/shared/pixel-mark.d.ts +18 -0
- package/dist/access/access/access-dialog-share.js +12 -6
- package/dist/access/access/share-selection.d.ts +9 -0
- package/dist/access/access/share-selection.js +64 -0
- package/dist/customize/connectors/catalog/connector-categories.d.ts +2 -2
- package/dist/customize/connectors/catalog/connector-categories.js +2 -2
- package/dist/customize/connectors/connector-identity.js +3 -3
- package/dist/customize/connectors/detail/app-page.js +2 -2
- package/dist/customize/connectors/detail/connector-accounts.d.ts +3 -1
- package/dist/customize/connectors/detail/connector-accounts.js +2 -2
- package/dist/customize/connectors/detail/connector-modal.js +1 -1
- package/dist/customize/connectors/detail/connector-notice-view.d.ts +4 -0
- package/dist/customize/connectors/detail/connector-notice-view.js +4 -0
- package/dist/customize/connectors/detail/connector-notice.d.ts +31 -4
- package/dist/customize/connectors/detail/connector-notice.js +23 -4
- package/dist/customize/connectors/detail/connector-page.js +27 -7
- package/dist/customize/connectors/detail/connector-status.d.ts +12 -1
- package/dist/customize/connectors/detail/connector-status.js +11 -0
- package/dist/customize/connectors/detail/status-badge.d.ts +3 -3
- package/dist/customize/connectors/detail/status-badge.js +2 -1
- package/dist/customize/connectors/detail/use-connector-detail.js +10 -2
- package/dist/customize/connectors/detail/use-mcp-oauth-sign-in.d.ts +13 -0
- package/dist/customize/connectors/detail/use-mcp-oauth-sign-in.js +29 -0
- package/dist/customize/providers/provider-accordion.js +5 -4
- package/dist/customize/providers/provider-connect.js +3 -1
- package/dist/customize/providers/provider-sheet.js +9 -4
- package/dist/customize/sections/component/email-connect-form.js +4 -2
- package/dist/customize/sections/connectors-view.d.ts +4 -1
- package/dist/customize/sections/connectors-view.js +42 -7
- package/dist/customize/sections/gateway-view.d.ts +1 -1
- package/dist/customize/sections/gateway-view.js +1 -1
- package/dist/customize/sections/view/account-secret-resources-panel.d.ts +15 -0
- package/dist/customize/sections/view/account-secret-resources-panel.js +48 -7
- package/dist/customize/sections/view/agent-editor-basics-fields.js +1 -1
- package/dist/customize/sections/view/gateway/gateway-logs.d.ts +1 -1
- package/dist/customize/sections/view/git-view.js +1 -1
- package/dist/customize/sections/view/permission-editor.js +1 -1
- package/dist/customize/sections/view/secret-delivery.d.ts +9 -2
- package/dist/customize/sections/view/secret-delivery.js +14 -4
- package/dist/customize/sections/view/secrets-view.js +21 -5
- package/dist/customize/sections/view/subscription-usage.d.ts +3 -32
- package/dist/customize/sections/view/subscription-usage.js +2 -86
- package/dist/customize/shared/entity/entity-modal.js +8 -10
- package/dist/customize/triggers/schedule/schedule-builder.js +1 -1
- package/dist/customize/triggers/schedule/schedule-copy.js +4 -0
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +14 -3
- package/dist/customize/triggers/schedule/then-fields.d.ts +3 -1
- package/dist/customize/triggers/schedule/then-fields.js +8 -4
- package/dist/customize/triggers/schedule/trigger-composer.js +1 -1
- package/dist/customize/triggers/schedule/trigger-list.d.ts +3 -1
- package/dist/customize/triggers/schedule/trigger-list.js +18 -2
- package/dist/customize/triggers/schedule/trigger-runs-logic.js +4 -2
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +4 -1
- package/dist/files/project/components/drive-toolbar.d.ts +1 -1
- package/dist/files/project/components/drive-toolbar.js +1 -1
- package/dist/files/project/store/version-store.d.ts +1 -1
- package/dist/files/renderers/pptx-renderer.js +5 -20
- package/dist/files/renderers/presentation/FullScreenPresentationViewer.d.ts +3 -2
- package/dist/files/renderers/presentation/FullScreenPresentationViewer.js +23 -304
- package/dist/files/renderers/presentation/presentation-export-menu.d.ts +14 -0
- package/dist/files/renderers/presentation/presentation-export-menu.js +44 -0
- package/dist/files/renderers/presentation/presentation-utils.d.ts +1 -0
- package/dist/files/renderers/presentation/presentation-utils.js +4 -0
- package/dist/files/renderers/presentation/slide-iframe.d.ts +23 -0
- package/dist/files/renderers/presentation/slide-iframe.js +61 -0
- package/dist/files/renderers/presentation/use-presentation-metadata.d.ts +39 -0
- package/dist/files/renderers/presentation/use-presentation-metadata.js +137 -0
- package/dist/files/renderers/presentation/use-slide-navigation.d.ts +17 -0
- package/dist/files/renderers/presentation/use-slide-navigation.js +82 -0
- package/dist/files/renderers/shared/scroll-area-compat.d.ts +6 -6
- package/dist/files/renderers/shared/scroll-area-compat.js +7 -9
- package/dist/files/renderers/shared/select-compat.js +3 -7
- package/dist/files/renderers/shared/use-stage-fit-scale.d.ts +19 -0
- package/dist/files/renderers/shared/use-stage-fit-scale.js +41 -0
- package/dist/files/renderers/show-content-renderer.js +16 -11
- package/dist/files/renderers/xlsx/xlsx-renderer.d.ts +4 -13
- package/dist/files/renderers/xlsx/xlsx-renderer.js +6 -63
- package/dist/files/renderers/xlsx/xlsx-viewer.d.ts +4 -2
- package/dist/files/renderers/xlsx/xlsx-viewer.js +28 -34
- package/dist/files/viewer/file-content-renderer.js +1 -4
- package/dist/files/viewer/file-preview-modal.d.ts +10 -11
- package/dist/files/viewer/file-preview-modal.js +17 -18
- package/dist/files/viewer/use-file-content-state.js +10 -9
- package/dist/i18n/en.d.ts +51 -0
- package/dist/i18n/en.js +58 -7
- package/dist/index.js +1 -1
- package/dist/internal/account-hub/account-hub-location.js +2 -2
- package/dist/internal/account-hub/use-account-members.d.ts +28 -1
- package/dist/internal/account-hub/use-account-members.js +27 -10
- package/dist/internal/chrome/use-chrome-offered.d.ts +2 -1
- package/dist/internal/chrome/use-chrome-offered.js +4 -2
- package/dist/internal/components/agent-mark.d.ts +1 -8
- package/dist/internal/components/agent-mark.js +2 -19
- package/dist/internal/hooks/connectors/use-finish-sign-in.d.ts +13 -0
- package/dist/internal/hooks/connectors/use-finish-sign-in.js +33 -0
- package/dist/internal/hooks/connectors/use-pipedream-connect-member.js +6 -1
- package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +6 -1
- package/dist/internal/lib/error-handler.js +33 -0
- package/dist/internal/lib/navigation/modified-click.js +2 -2
- package/dist/internal/lib/pixel-mark.d.ts +3 -20
- package/dist/internal/lib/pixel-mark.js +3 -34
- package/dist/internal/lib/trigger-clock.d.ts +7 -2
- package/dist/internal/lib/trigger-clock.js +17 -3
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/browser-recents-store.d.ts +1 -1
- package/dist/internal/stores/current-account-store.d.ts +1 -1
- package/dist/internal/stores/first-chat-store.d.ts +1 -1
- package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
- package/dist/internal/stores/session-browser-store.d.ts +1 -1
- package/dist/internal/stores/session-expanded-store.d.ts +1 -1
- package/dist/internal/stores/session-filter-store.d.ts +1 -1
- package/dist/internal/stores/session-history-view-store.d.ts +1 -1
- package/dist/internal/stores/session-hover-store.d.ts +1 -1
- package/dist/internal/stores/session-hover-store.js +1 -1
- package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
- package/dist/internal/stores/sound-store.d.ts +1 -1
- package/dist/internal/stores/tab-store.d.ts +1 -1
- package/dist/internal/stores/user-preferences-store.d.ts +1 -1
- package/dist/internal/stores/web-notification-store.d.ts +1 -1
- package/dist/lib/base-ui-compat.d.ts +149 -0
- package/dist/lib/base-ui-compat.js +339 -0
- package/dist/lib/portal-container.d.ts +3 -7
- package/dist/lib/portal-container.js +5 -3
- package/dist/lib/z-stack.d.ts +9 -5
- package/dist/lib/z-stack.js +17 -7
- package/dist/primitives/accordion.d.ts +36 -5
- package/dist/primitives/accordion.js +41 -8
- package/dist/primitives/alert-dialog.d.ts +33 -11
- package/dist/primitives/alert-dialog.js +41 -19
- package/dist/primitives/avatar.d.ts +5 -2
- package/dist/primitives/avatar.js +3 -3
- package/dist/primitives/badge.js +1 -1
- package/dist/primitives/breadcrumb.js +1 -1
- package/dist/primitives/button-group.js +3 -3
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox.d.ts +14 -5
- package/dist/primitives/checkbox.js +24 -9
- package/dist/primitives/collapsible.d.ts +16 -4
- package/dist/primitives/collapsible.js +18 -7
- package/dist/primitives/command-core.d.ts +121 -0
- package/dist/primitives/command-core.js +642 -0
- package/dist/primitives/command.d.ts +38 -4
- package/dist/primitives/command.js +22 -13
- package/dist/primitives/context-menu.d.ts +61 -31
- package/dist/primitives/context-menu.js +40 -53
- package/dist/primitives/dialog.d.ts +48 -10
- package/dist/primitives/dialog.js +48 -19
- package/dist/primitives/disclosure.d.ts +1 -1
- package/dist/primitives/disclosure.js +2 -2
- package/dist/primitives/drawer.d.ts +28 -9
- package/dist/primitives/drawer.js +42 -18
- package/dist/primitives/dropdown-menu.d.ts +55 -33
- package/dist/primitives/dropdown-menu.js +46 -82
- package/dist/primitives/faded-scroll-area.js +2 -1
- package/dist/primitives/hint.js +3 -3
- package/dist/primitives/hover-card.d.ts +17 -5
- package/dist/primitives/hover-card.js +45 -8
- package/dist/primitives/item.js +2 -2
- package/dist/primitives/label.d.ts +5 -2
- package/dist/primitives/label.js +10 -3
- package/dist/primitives/menu-base.d.ts +150 -0
- package/dist/primitives/menu-base.js +171 -0
- package/dist/primitives/menu-recipe.d.ts +1 -1
- package/dist/primitives/menu-recipe.js +2 -7
- package/dist/primitives/modal.d.ts +19 -52
- package/dist/primitives/modal.js +24 -28
- package/dist/primitives/navigation-menu.d.ts +36 -11
- package/dist/primitives/navigation-menu.js +31 -12
- package/dist/primitives/popover.d.ts +31 -6
- package/dist/primitives/popover.js +79 -12
- package/dist/primitives/preview-image.d.ts +18 -7
- package/dist/primitives/preview-image.js +14 -11
- package/dist/primitives/progress.d.ts +4 -2
- package/dist/primitives/progress.js +4 -3
- package/dist/primitives/project-icon-picker.js +2 -2
- package/dist/primitives/radio-group.d.ts +28 -5
- package/dist/primitives/radio-group.js +18 -10
- package/dist/primitives/scroll-area.d.ts +2 -2
- package/dist/primitives/scroll-area.js +8 -3
- package/dist/primitives/select.d.ts +55 -12
- package/dist/primitives/select.js +93 -36
- package/dist/primitives/separator.d.ts +6 -2
- package/dist/primitives/separator.js +10 -2
- package/dist/primitives/sheet.d.ts +17 -10
- package/dist/primitives/sheet.js +19 -22
- package/dist/primitives/sidebar-menu-primitives.js +8 -8
- package/dist/primitives/slider-native.d.ts +2 -2
- package/dist/primitives/slider-native.js +11 -9
- package/dist/primitives/slider.d.ts +24 -6
- package/dist/primitives/slider.js +26 -24
- package/dist/primitives/slot.d.ts +6 -0
- package/dist/primitives/slot.js +7 -0
- package/dist/primitives/split-sheet.js +1 -1
- package/dist/primitives/stepper.js +1 -1
- package/dist/primitives/switch.d.ts +16 -3
- package/dist/primitives/switch.js +7 -6
- package/dist/primitives/tabs.d.ts +36 -20
- package/dist/primitives/tabs.js +131 -102
- package/dist/primitives/toggle.d.ts +16 -3
- package/dist/primitives/toggle.js +8 -3
- package/dist/primitives/tooltip.d.ts +24 -5
- package/dist/primitives/tooltip.js +32 -10
- package/dist/primitives/type-to-confirm-dialog.d.ts +1 -1
- package/dist/primitives/type-to-confirm-dialog.js +1 -1
- package/dist/session/composer/animated-placeholder.js +1 -1
- package/dist/session/composer/chat-input/chat-input-control.js +3 -3
- package/dist/session/composer/editor/composer-editor.js +1 -1
- package/dist/session/composer/menus/menu-shell.d.ts +1 -1
- package/dist/session/composer/menus/menu-shell.js +1 -1
- package/dist/session/composer/menus/mount.js +1 -1
- package/dist/session/composer/reasoning-effort-selector.js +1 -1
- package/dist/session/header/session-site-header.js +2 -2
- package/dist/session/header/subagent-hover-card.js +2 -2
- package/dist/session/media/image-preview.js +1 -1
- package/dist/session/models/model-connection-gate.js +16 -3
- package/dist/session/models/model-picker-panel.js +6 -2
- package/dist/session/models/model-selector.d.ts +1 -1
- package/dist/session/models/model-selector.js +18 -12
- package/dist/session/models/provider-key-action.d.ts +10 -0
- package/dist/session/models/provider-key-action.js +35 -0
- package/dist/session/models/provider-key-slot.d.ts +9 -0
- package/dist/session/models/provider-key-slot.js +19 -0
- package/dist/session/models/subscription-switcher.d.ts +37 -0
- package/dist/session/models/subscription-switcher.js +97 -0
- package/dist/session/models/subscription-windows.d.ts +40 -0
- package/dist/session/models/subscription-windows.js +86 -0
- package/dist/session/overrides/session-overrides-control.js +3 -3
- package/dist/session/panel/diff-dialog.js +1 -1
- package/dist/session/panel/easy/detail-view.js +3 -3
- package/dist/session/panel/mobile-tool-drawer.js +2 -2
- package/dist/session/panel/panel-fallback.js +1 -1
- package/dist/session/panel/session-files-explorer.d.ts +1 -1
- package/dist/session/panel/session-files-explorer.js +1 -1
- package/dist/session/prompts/session-connect-prompt.d.ts +40 -0
- package/dist/session/prompts/session-connect-prompt.js +126 -0
- package/dist/session/status/session-error-banner.d.ts +1 -1
- package/dist/session/status/session-error-banner.js +12 -4
- package/dist/session/thread/session-chat.js +9 -4
- package/dist/session/thread/session-context-message-explorer.js +1 -1
- package/dist/session/thread/transcript.js +31 -7
- package/dist/session/thread/turn-share.js +3 -4
- package/dist/session/tool/shared/show-helpers.js +1 -1
- package/dist/session/turn/message-time-label.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/test-utils/intl.d.ts +51 -0
- package/dist/workspace/projects/modal/project-icon-field.js +9 -23
- package/dist/workspace/review/review-center.js +1 -1
- package/dist/workspace/sessions/session-row.js +1 -1
- package/dist/workspace/sidebar/project-session-list.js +2 -2
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +1 -1
- package/dist/workspace/sidebar/session-brief-hover-card.js +3 -3
- package/dist/workspace/sidebar/session-title.d.ts +2 -2
- package/dist/workspace/sidebar/session-title.js +2 -2
- package/dist/workspace/sidebar/workspace-menu-section.js +1 -1
- package/dist/workspace/spaces/space-links.js +1 -1
- package/dist/workspace/spaces/space-threads-tab.js +1 -1
- package/package.json +16 -35
- package/skills/kortix-ui/SKILL.md +1 -1
- package/skills/kortix-ui/references/custom-dashboard.md +1 -1
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
/**
|
|
3
|
-
* The account member list, read once and shared by the hub page (the Members
|
|
4
|
-
* pane) and the settings sidebar (the count beside "Members"). One key, one
|
|
5
|
-
* fetcher, one gate — two hand-typed copies is how a "13 readers, one
|
|
6
|
-
* request" property quietly becomes two requests (see
|
|
7
|
-
* `packages/ui/src/internal/hooks/account/use-accounts-list.ts` for the longer version of that story).
|
|
8
|
-
*/
|
|
9
2
|
import { listAccountMembers } from '@kortix/sdk';
|
|
10
3
|
import { contract } from '@kortix/sdk/react';
|
|
11
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { useMemo } from 'react';
|
|
12
6
|
import { useUiViewerId } from '../../providers/ui-provider.js';
|
|
13
|
-
export function useAccountMembers(accountId
|
|
7
|
+
export function useAccountMembers(accountId,
|
|
8
|
+
/** Extra gate ANDed with the signed-in check — a surface that only needs
|
|
9
|
+
* the roster while a dialog is open passes `{ enabled: isOpen }`. */
|
|
10
|
+
options) {
|
|
14
11
|
const viewerId = useUiViewerId();
|
|
15
12
|
// `GET .../members` answers every account member: the whole directory with
|
|
16
13
|
// `member.read`, else only the caller. No probe to
|
|
17
14
|
// wait for.
|
|
18
|
-
|
|
15
|
+
const query = useQuery({
|
|
19
16
|
queryKey: ['account-members', accountId],
|
|
20
17
|
queryFn: () => listAccountMembers(accountId),
|
|
21
|
-
enabled: !!viewerId && !!accountId,
|
|
18
|
+
enabled: !!viewerId && !!accountId && (options?.enabled ?? true),
|
|
22
19
|
...contract('directory'),
|
|
23
20
|
});
|
|
21
|
+
const emailByUserId = useMemo(() => {
|
|
22
|
+
const map = new Map();
|
|
23
|
+
for (const m of query.data ?? []) {
|
|
24
|
+
if (m.email)
|
|
25
|
+
map.set(m.user_id, m.email);
|
|
26
|
+
}
|
|
27
|
+
return map;
|
|
28
|
+
}, [query.data]);
|
|
29
|
+
const accountMetaByUserId = useMemo(() => {
|
|
30
|
+
const map = new Map();
|
|
31
|
+
for (const m of query.data ?? []) {
|
|
32
|
+
map.set(m.user_id, {
|
|
33
|
+
email: m.email,
|
|
34
|
+
accountRole: m.account_role,
|
|
35
|
+
isSuperAdmin: !!m.is_super_admin,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return map;
|
|
39
|
+
}, [query.data]);
|
|
40
|
+
return { ...query, emailByUserId, accountMetaByUserId };
|
|
24
41
|
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* no sidebar row and no card in Apps and extensions. Off on every deployment
|
|
6
6
|
* until launch: the probe below logged a 404 in the console on staging and
|
|
7
7
|
* prod, where the API's KORTIX_CHROME_ENABLED is off. Set true to bring the
|
|
8
|
-
* surfaces back where the API serves the routes.
|
|
8
|
+
* surfaces back where the API serves the routes. The value is
|
|
9
|
+
* `CHROME_LAUNCHED`, which the API and the CLI read too.
|
|
9
10
|
*/
|
|
10
11
|
export declare const CHROME_UI_ENABLED = false;
|
|
11
12
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { listChromeConnections } from '@kortix/sdk';
|
|
3
3
|
import { chromeKeys } from '@kortix/sdk/react';
|
|
4
|
+
import { CHROME_LAUNCHED } from '../../_vendor/kortix-shared.js';
|
|
4
5
|
import { useQuery } from '@tanstack/react-query';
|
|
5
6
|
/**
|
|
6
7
|
* The web app's master switch for Kortix in Chrome. Off, no surface renders
|
|
@@ -8,9 +9,10 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
8
9
|
* no sidebar row and no card in Apps and extensions. Off on every deployment
|
|
9
10
|
* until launch: the probe below logged a 404 in the console on staging and
|
|
10
11
|
* prod, where the API's KORTIX_CHROME_ENABLED is off. Set true to bring the
|
|
11
|
-
* surfaces back where the API serves the routes.
|
|
12
|
+
* surfaces back where the API serves the routes. The value is
|
|
13
|
+
* `CHROME_LAUNCHED`, which the API and the CLI read too.
|
|
12
14
|
*/
|
|
13
|
-
export const CHROME_UI_ENABLED =
|
|
15
|
+
export const CHROME_UI_ENABLED = CHROME_LAUNCHED;
|
|
14
16
|
/**
|
|
15
17
|
* Whether this platform offers Kortix in Chrome at all. The API answers 404
|
|
16
18
|
* on /v1/chrome/* where KORTIX_CHROME_ENABLED is off (staging, prod), so the
|
|
@@ -39,11 +39,4 @@ export declare function AgentMark({ slug, size, tile, label, className, }: {
|
|
|
39
39
|
label?: string;
|
|
40
40
|
className?: string;
|
|
41
41
|
}): import("react").JSX.Element;
|
|
42
|
-
|
|
43
|
-
* An agent's name as a person reads it: My Kortix for the built-in agent,
|
|
44
|
-
* otherwise the manifest key in sentence case with its separators as spaces
|
|
45
|
-
* (`session-reviewer` → "Session reviewer"). One helper, so the sidebar, the
|
|
46
|
-
* agent page, the index and the hover hint name an agent the same way.
|
|
47
|
-
*/
|
|
48
|
-
export declare function agentDisplayName(slug: string): string;
|
|
49
|
-
export {};
|
|
42
|
+
export { agentDisplayName } from '../../_vendor/shared/index.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from '../lib/utils.js';
|
|
4
4
|
import { Hint } from '../../primitives/hint.js';
|
|
5
|
-
import {
|
|
5
|
+
import { agentDisplayName } from '../../_vendor/kortix-shared.js';
|
|
6
6
|
import { pixelMark } from '../lib/pixel-mark.js';
|
|
7
7
|
/** Mark size → tile size. The mark is a multiple of 7, so each pixel lands on
|
|
8
8
|
* whole device pixels; any other size blurs the edges. Literal px because
|
|
@@ -50,21 +50,4 @@ export function AgentMark({ slug, size = 14, tile = TILE[size], label, className
|
|
|
50
50
|
const mark = (_jsx("span", { "aria-hidden": true, "data-slot": "agent-mark", style: { ...agentMarkVars(slug), width: tile, height: tile }, className: cn('inline-flex shrink-0 items-center justify-center bg-(--mark-tile)', size >= 28 ? 'rounded-md' : 'rounded-sm', agentMarkTileClass(slug), className), children: _jsx(AgentMarkGlyph, { slug: slug, size: size }) }));
|
|
51
51
|
return (_jsx(Hint, { side: "top", sideOffset: 6, alignOffset: 0, label: label ?? agentDisplayName(slug), children: mark }));
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
* An agent's name as a person reads it: My Kortix for the built-in agent,
|
|
55
|
-
* otherwise the manifest key in sentence case with its separators as spaces
|
|
56
|
-
* (`session-reviewer` → "Session reviewer"). One helper, so the sidebar, the
|
|
57
|
-
* agent page, the index and the hover hint name an agent the same way.
|
|
58
|
-
*/
|
|
59
|
-
export function agentDisplayName(slug) {
|
|
60
|
-
if (isMyKortixAgentName(slug))
|
|
61
|
-
return MY_KORTIX_DISPLAY_NAME;
|
|
62
|
-
// Model tool input and event data reach this through `as string` casts, so the
|
|
63
|
-
// slug is `unknown` at runtime. A truthy non-string degrades to its string
|
|
64
|
-
// form instead of crashing the render tree (KRTX-4511: `e.replace is not a
|
|
65
|
-
// function` took down the session page).
|
|
66
|
-
if (typeof slug !== 'string')
|
|
67
|
-
return String(slug);
|
|
68
|
-
const words = slug.replace(/[-_]+/g, ' ').trim();
|
|
69
|
-
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
70
|
-
}
|
|
53
|
+
export { agentDisplayName } from '../../_vendor/kortix-shared.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
|
+
import { type Connection } from '@kortix/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* Finish the sign-in of one account whose sign-in started and never finished
|
|
5
|
+
* (an agent's link the person used outside Kortix, an abandoned window).
|
|
6
|
+
*
|
|
7
|
+
* The window opens inside the click. The first request asks the provider: a
|
|
8
|
+
* sign-in that already finished there is recorded and the window closes. Only
|
|
9
|
+
* an unfinished one goes on to a new sign-in page for the same account.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useFinishSignIn(projectId: string, slug: string, onConnected: () => void): import("@tanstack/react-query").UseMutationResult<{
|
|
12
|
+
connected: true;
|
|
13
|
+
}, Error, Pick<Connection, "owner_type" | "connection_id">, unknown>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { connectionSignInSteps } from '@kortix/sdk';
|
|
3
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
4
|
+
import { invalidateConnections } from '../../../customize/connectors/invalidate-connections.js';
|
|
5
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
6
|
+
import { errorToast, successToast } from '../../../primitives/toast.js';
|
|
7
|
+
import { runConnectLinkFlow } from './use-connect-link.js';
|
|
8
|
+
/**
|
|
9
|
+
* Finish the sign-in of one account whose sign-in started and never finished
|
|
10
|
+
* (an agent's link the person used outside Kortix, an abandoned window).
|
|
11
|
+
*
|
|
12
|
+
* The window opens inside the click. The first request asks the provider: a
|
|
13
|
+
* sign-in that already finished there is recorded and the window closes. Only
|
|
14
|
+
* an unfinished one goes on to a new sign-in page for the same account.
|
|
15
|
+
*/
|
|
16
|
+
export function useFinishSignIn(projectId, slug, onConnected) {
|
|
17
|
+
const t = useTranslations('connectSignIn');
|
|
18
|
+
const queryClient = useQueryClient();
|
|
19
|
+
return useMutation({
|
|
20
|
+
mutationFn: async (account) => {
|
|
21
|
+
const steps = connectionSignInSteps(projectId, slug, account);
|
|
22
|
+
return runConnectLinkFlow(steps.start, steps.finalize);
|
|
23
|
+
},
|
|
24
|
+
onSuccess: () => {
|
|
25
|
+
successToast(t('signInFinished'));
|
|
26
|
+
onConnected();
|
|
27
|
+
},
|
|
28
|
+
onError: (error) => errorToast(error.message),
|
|
29
|
+
// Settled either way: a window closed before the provider answered still
|
|
30
|
+
// left the account row, and every list must show it without a reload.
|
|
31
|
+
onSettled: () => invalidateConnections(queryClient, projectId),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { invalidateConnections } from '../../../customize/connectors/invalidate-connections.js';
|
|
3
4
|
import { useTranslations } from '../../../i18n/index.js';
|
|
4
5
|
import { errorToast, successToast } from '../../../primitives/toast.js';
|
|
5
6
|
import { runConnectLinkFlow } from './use-connect-link.js';
|
|
@@ -9,6 +10,7 @@ import { pipedreamConnectConnection, pipedreamFinalizeConnection, reconcileMembe
|
|
|
9
10
|
*/
|
|
10
11
|
export function usePipedreamConnectMember(projectId, slug, onConnected) {
|
|
11
12
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
13
|
+
const queryClient = useQueryClient();
|
|
12
14
|
return useMutation({
|
|
13
15
|
mutationFn: async (input) => {
|
|
14
16
|
let connectionId = null;
|
|
@@ -34,5 +36,8 @@ export function usePipedreamConnectMember(projectId, slug, onConnected) {
|
|
|
34
36
|
onConnected();
|
|
35
37
|
},
|
|
36
38
|
onError: (err) => errorToast(err.message),
|
|
39
|
+
// Settled either way: a window closed before the provider answered still
|
|
40
|
+
// left the account row, and every list must show it without a reload.
|
|
41
|
+
onSettled: () => invalidateConnections(queryClient, projectId),
|
|
37
42
|
});
|
|
38
43
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { invalidateConnections } from '../../../customize/connectors/invalidate-connections.js';
|
|
3
4
|
import { useTranslations } from '../../../i18n/index.js';
|
|
4
5
|
import { errorToast, successToast } from '../../../primitives/toast.js';
|
|
5
6
|
import { runConnectLinkFlow } from './use-connect-link.js';
|
|
@@ -11,6 +12,7 @@ export { DEFAULT_PROJECT_CONNECTION_LABEL, isSharedDefaultConnectConflict, proje
|
|
|
11
12
|
*/
|
|
12
13
|
export function usePipedreamConnectProject(projectId, slug, onConnected) {
|
|
13
14
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
15
|
+
const queryClient = useQueryClient();
|
|
14
16
|
return useMutation({
|
|
15
17
|
mutationFn: async (input) => {
|
|
16
18
|
const steps = projectConnectSteps(projectId, slug, input?.label, sdkProjectConnectDeps, input?.beforeAuthorize);
|
|
@@ -24,5 +26,8 @@ export function usePipedreamConnectProject(projectId, slug, onConnected) {
|
|
|
24
26
|
onConnected();
|
|
25
27
|
},
|
|
26
28
|
onError: (error) => errorToast(error.message),
|
|
29
|
+
// Settled either way: a window closed before the provider answered still
|
|
30
|
+
// left the account row, and every list must show it without a reload.
|
|
31
|
+
onSettled: () => invalidateConnections(queryClient, projectId),
|
|
27
32
|
});
|
|
28
33
|
}
|
|
@@ -3,6 +3,8 @@ import { isGitMirrorUnavailableNoiseMessage, isServerDeadlineNoiseMessage, } fro
|
|
|
3
3
|
import { isSilentTimeoutError } from './timeout-toast-policy.js';
|
|
4
4
|
import { openAccountSettings } from '../stores/account-settings-modal-store.js';
|
|
5
5
|
import { useUpgradeDialogStore } from '../stores/upgrade-dialog-store.js';
|
|
6
|
+
import { projectIdFromPathname } from '../stores/project-switch-store.js';
|
|
7
|
+
import { capabilityTabHref } from './capability-tab-routes.js';
|
|
6
8
|
import { BillingError, formatBillingErrorForUI, isBillingError } from '@kortix/sdk/react';
|
|
7
9
|
import { platformConfig } from '@kortix/sdk';
|
|
8
10
|
import { captureException } from '../../lib/telemetry.js';
|
|
@@ -218,6 +220,37 @@ export const handleApiError = (error, context, tI18nComplete) => {
|
|
|
218
220
|
// billing 402s. Scopes the upgrade dialog so a non-billing member sees the
|
|
219
221
|
// team's gated CTA, not their own primary account. Absent → primary account.
|
|
220
222
|
const v2AccountId = typeof v2Detail?.account_id === 'string' ? v2Detail.account_id : undefined;
|
|
223
|
+
// Session create refused because no model can run (409 `no_model_available`):
|
|
224
|
+
// a Free account sees no Kortix model (managed models are Credits-plan
|
|
225
|
+
// only) and has no provider key. Say so with both ways out, instead of a
|
|
226
|
+
// composer that reads "No model" with Send disabled and no reason.
|
|
227
|
+
if (v2Code === 'no_model_available') {
|
|
228
|
+
if (!context?.silent) {
|
|
229
|
+
const projectId = typeof window === 'undefined' ? null : projectIdFromPathname(window.location.pathname);
|
|
230
|
+
const actions = [
|
|
231
|
+
...(platformConfig().billingEnabled
|
|
232
|
+
? [{
|
|
233
|
+
label: tI18nComplete('noModelUpgradePlan'),
|
|
234
|
+
onClick: () => useUpgradeDialogStore.getState().openUpgradeDialog({
|
|
235
|
+
reason: 'subscription_required',
|
|
236
|
+
accountId: v2AccountId,
|
|
237
|
+
}),
|
|
238
|
+
}]
|
|
239
|
+
: []),
|
|
240
|
+
{
|
|
241
|
+
label: tI18nComplete('noModelAddProviderKey'),
|
|
242
|
+
onClick: () => {
|
|
243
|
+
if (!projectId || typeof window === 'undefined')
|
|
244
|
+
return;
|
|
245
|
+
// Next.js syncs its router with native pushState (see openAccountPanel).
|
|
246
|
+
window.history.pushState(null, '', capabilityTabHref(projectId, 'models'));
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
];
|
|
250
|
+
errorToast(v2Message ?? errorMessage, { actions, duration: 10000 });
|
|
251
|
+
}
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
221
254
|
// Marketplace imports can use either a paid managed model or a provider
|
|
222
255
|
// key. Preserve the server's remedy instead of swallowing this BillingError
|
|
223
256
|
// or sending an already-paid customer to the plan picker.
|
|
@@ -15,7 +15,7 @@ export function isModifiedClick(event) {
|
|
|
15
15
|
event.ctrlKey ||
|
|
16
16
|
event.shiftKey ||
|
|
17
17
|
event.altKey ||
|
|
18
|
-
// 0 = primary.
|
|
19
|
-
// button 0, so Enter still counts as an ordinary activation.
|
|
18
|
+
// 0 = primary. Keyboard activation (Enter on a button or menu item) fires
|
|
19
|
+
// a click with button 0, so Enter still counts as an ordinary activation.
|
|
20
20
|
event.button !== 0);
|
|
21
21
|
}
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
2
|
/**
|
|
3
|
-
* An agent's pixel mark on its tile
|
|
4
|
-
*
|
|
3
|
+
* An agent's pixel mark on its tile. The shape and the tone live in
|
|
4
|
+
* `@kortix/shared/pixel-mark`, so the API paints the same face (Slack posts).
|
|
5
5
|
*/
|
|
6
|
-
export { passesPixelMarkGate } from '../../_vendor/shared/pixel-mark.js';
|
|
7
|
-
export interface PixelMarkTone {
|
|
8
|
-
name: string;
|
|
9
|
-
tile: string;
|
|
10
|
-
ink: string;
|
|
11
|
-
/** Dark theme: the pair inverts, so the tile stays visible on a dark page. */
|
|
12
|
-
tileDark: string;
|
|
13
|
-
inkDark: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const PIXEL_MARK_TONES: readonly PixelMarkTone[];
|
|
16
|
-
export declare function pixelMark(slug: string): {
|
|
17
|
-
tone: PixelMarkTone;
|
|
18
|
-
grid: boolean[][];
|
|
19
|
-
path: string;
|
|
20
|
-
ditherPath: string;
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
};
|
|
6
|
+
export { passesPixelMarkGate, pixelMark, PIXEL_MARK_TONES, type PixelMarkTone } from '../../_vendor/shared/pixel-mark.js';
|
|
@@ -1,36 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* An agent's pixel mark on its tile
|
|
3
|
-
*
|
|
2
|
+
* An agent's pixel mark on its tile. The shape and the tone live in
|
|
3
|
+
* `@kortix/shared/pixel-mark`, so the API paints the same face (Slack posts).
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
export { passesPixelMarkGate } from '../../_vendor/kortix-shared.js';
|
|
7
|
-
const tone = (name, tile, ink) => ({
|
|
8
|
-
name,
|
|
9
|
-
tile,
|
|
10
|
-
ink,
|
|
11
|
-
tileDark: ink,
|
|
12
|
-
inkDark: tile,
|
|
13
|
-
});
|
|
14
|
-
export const PIXEL_MARK_TONES = [
|
|
15
|
-
tone('graphite', '#EDEDED', '#191919'),
|
|
16
|
-
tone('sand', '#F1EBDD', '#6B5A3A'),
|
|
17
|
-
tone('moss', '#E6EDE0', '#3F5A33'),
|
|
18
|
-
tone('sea', '#E2ECF0', '#2E5566'),
|
|
19
|
-
tone('blue', '#E6EEFF', '#2457C5'),
|
|
20
|
-
tone('plum', '#EEE6F0', '#5E3A68'),
|
|
21
|
-
tone('clay', '#F3E6E0', '#7A4532'),
|
|
22
|
-
tone('slate', '#E4E7EC', '#3B4656'),
|
|
23
|
-
];
|
|
24
|
-
/** The starter's `kortix` agent and My Kortix (slug `mykortix`) keep the brand tile. */
|
|
25
|
-
const BRAND = {
|
|
26
|
-
name: 'brand',
|
|
27
|
-
tile: '#1F1F1F',
|
|
28
|
-
ink: '#FFFFFF',
|
|
29
|
-
tileDark: '#2C2C2C',
|
|
30
|
-
inkDark: '#FFFFFF',
|
|
31
|
-
};
|
|
32
|
-
const RESERVED = { kortix: BRAND, mykortix: BRAND, meta: BRAND };
|
|
33
|
-
export function pixelMark(slug) {
|
|
34
|
-
const tone = RESERVED[slug] ?? PIXEL_MARK_TONES[fnv1a(`${slug}#tone`) % PIXEL_MARK_TONES.length];
|
|
35
|
-
return { ...pixelMarkShape(slug), tone };
|
|
36
|
-
}
|
|
5
|
+
export { passesPixelMarkGate, pixelMark, PIXEL_MARK_TONES } from '../../_vendor/kortix-shared.js';
|
|
@@ -38,8 +38,13 @@ export declare const CLOCK_TONE: {
|
|
|
38
38
|
readonly dot: "bg-kortix-yellow";
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
/**
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* "2d ago", "9h ago", "3w ago" in the viewer's locale, or "Never run". A failed
|
|
43
|
+
* attempt newer than the last fire reads "Failed · 5m ago": a failed fire does
|
|
44
|
+
* not advance `last_fired_at` (the scheduler retries it), so a trigger whose
|
|
45
|
+
* every attempt failed read "Never run".
|
|
46
|
+
*/
|
|
47
|
+
export declare function lastRunLabel(trigger: Pick<ProjectTrigger, 'last_fired_at' | 'event'> & Partial<Pick<ProjectTrigger, 'last_status' | 'last_attempt_at'>>, t: UiTranslator, locale: string, now?: number): string;
|
|
43
48
|
/**
|
|
44
49
|
* A future run in whole minutes, hours or days, worded by `rtf`: "in 25m"
|
|
45
50
|
* (narrow), "in 25 minutes" (long). A past time reads as now; "—" with no time.
|
|
@@ -14,12 +14,26 @@ export const CLOCK_TONE = {
|
|
|
14
14
|
pending: YELLOW,
|
|
15
15
|
paused: YELLOW,
|
|
16
16
|
};
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* "2d ago", "9h ago", "3w ago" in the viewer's locale, or "Never run". A failed
|
|
19
|
+
* attempt newer than the last fire reads "Failed · 5m ago": a failed fire does
|
|
20
|
+
* not advance `last_fired_at` (the scheduler retries it), so a trigger whose
|
|
21
|
+
* every attempt failed read "Never run".
|
|
22
|
+
*/
|
|
18
23
|
export function lastRunLabel(trigger, t, locale, now = Date.now()) {
|
|
19
24
|
const iso = trigger.last_fired_at ?? trigger.event?.last_event_at ?? null;
|
|
20
|
-
const
|
|
21
|
-
|
|
25
|
+
const fired = iso ? Date.parse(iso) : Number.NaN;
|
|
26
|
+
const attempted = trigger.last_attempt_at ? Date.parse(trigger.last_attempt_at) : Number.NaN;
|
|
27
|
+
if (trigger.last_status === 'failed' &&
|
|
28
|
+
Number.isFinite(attempted) &&
|
|
29
|
+
!(Number.isFinite(fired) && fired >= attempted)) {
|
|
30
|
+
return `${t.raw('text031a8f0f659d')} · ${ago(attempted, locale, now)}`;
|
|
31
|
+
}
|
|
32
|
+
if (!Number.isFinite(fired))
|
|
22
33
|
return t.raw('text3d40a69d3160');
|
|
34
|
+
return ago(fired, locale, now);
|
|
35
|
+
}
|
|
36
|
+
function ago(at, locale, now) {
|
|
23
37
|
const rtf = new Intl.RelativeTimeFormat(locale, { style: 'narrow', numeric: 'auto' });
|
|
24
38
|
const min = Math.floor(Math.max(0, now - at) / 60_000);
|
|
25
39
|
if (min < 1)
|
|
@@ -12,7 +12,7 @@ interface ActiveSpaceState {
|
|
|
12
12
|
byProject: ActiveByProject;
|
|
13
13
|
setSpace: (projectId: string, space: string | null) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare const useActiveSpaceStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<ActiveSpaceState>, "
|
|
15
|
+
export declare const useActiveSpaceStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<ActiveSpaceState>, "persist" | "setState"> & {
|
|
16
16
|
setState(partial: ActiveSpaceState | Partial<ActiveSpaceState> | ((state: ActiveSpaceState) => ActiveSpaceState | Partial<ActiveSpaceState>), replace?: false | undefined): unknown;
|
|
17
17
|
setState(state: ActiveSpaceState | ((state: ActiveSpaceState) => ActiveSpaceState), replace: true): unknown;
|
|
18
18
|
persist: {
|
|
@@ -20,7 +20,7 @@ interface BrowserRecentsState {
|
|
|
20
20
|
removeRecent: (url: string) => void;
|
|
21
21
|
clearRecents: () => void;
|
|
22
22
|
}
|
|
23
|
-
export declare const useBrowserRecentsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<BrowserRecentsState>, "
|
|
23
|
+
export declare const useBrowserRecentsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<BrowserRecentsState>, "persist" | "setState"> & {
|
|
24
24
|
setState(partial: BrowserRecentsState | Partial<BrowserRecentsState> | ((state: BrowserRecentsState) => BrowserRecentsState | Partial<BrowserRecentsState>), replace?: false | undefined): unknown;
|
|
25
25
|
setState(state: BrowserRecentsState | ((state: BrowserRecentsState) => BrowserRecentsState), replace: true): unknown;
|
|
26
26
|
persist: {
|
|
@@ -12,7 +12,7 @@ interface CurrentAccountState {
|
|
|
12
12
|
setSelectedAccountId: (id: string | null) => void;
|
|
13
13
|
clear: () => void;
|
|
14
14
|
}
|
|
15
|
-
export declare const useCurrentAccountStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<CurrentAccountState>, "
|
|
15
|
+
export declare const useCurrentAccountStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<CurrentAccountState>, "persist" | "setState"> & {
|
|
16
16
|
setState(partial: CurrentAccountState | Partial<CurrentAccountState> | ((state: CurrentAccountState) => CurrentAccountState | Partial<CurrentAccountState>), replace?: false | undefined): unknown;
|
|
17
17
|
setState(state: CurrentAccountState | ((state: CurrentAccountState) => CurrentAccountState), replace: true): unknown;
|
|
18
18
|
persist: {
|
|
@@ -4,7 +4,7 @@ interface FirstChatState {
|
|
|
4
4
|
start: (projectId: string) => void;
|
|
5
5
|
finish: (projectId: string) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const useFirstChatStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<FirstChatState>, "
|
|
7
|
+
export declare const useFirstChatStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<FirstChatState>, "persist" | "setState"> & {
|
|
8
8
|
setState(partial: FirstChatState | Partial<FirstChatState> | ((state: FirstChatState) => FirstChatState | Partial<FirstChatState>), replace?: false | undefined): unknown;
|
|
9
9
|
setState(state: FirstChatState | ((state: FirstChatState) => FirstChatState), replace: true): unknown;
|
|
10
10
|
persist: {
|
|
@@ -3,7 +3,7 @@ interface MobileAppPromoState {
|
|
|
3
3
|
closed: boolean;
|
|
4
4
|
close: () => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const useMobileAppPromoStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<MobileAppPromoState>, "
|
|
6
|
+
export declare const useMobileAppPromoStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<MobileAppPromoState>, "persist" | "setState"> & {
|
|
7
7
|
setState(partial: MobileAppPromoState | Partial<MobileAppPromoState> | ((state: MobileAppPromoState) => MobileAppPromoState | Partial<MobileAppPromoState>), replace?: false | undefined): unknown;
|
|
8
8
|
setState(state: MobileAppPromoState | ((state: MobileAppPromoState) => MobileAppPromoState), replace: true): unknown;
|
|
9
9
|
persist: {
|
|
@@ -72,7 +72,7 @@ interface SessionBrowserState {
|
|
|
72
72
|
activeSessionId: string | null;
|
|
73
73
|
setActiveSessionId: (id: string | null) => void;
|
|
74
74
|
}
|
|
75
|
-
export declare const useSessionBrowserStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SessionBrowserState>, "
|
|
75
|
+
export declare const useSessionBrowserStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SessionBrowserState>, "persist" | "setState"> & {
|
|
76
76
|
setState(partial: SessionBrowserState | Partial<SessionBrowserState> | ((state: SessionBrowserState) => SessionBrowserState | Partial<SessionBrowserState>), replace?: false | undefined): unknown;
|
|
77
77
|
setState(state: SessionBrowserState | ((state: SessionBrowserState) => SessionBrowserState), replace: true): unknown;
|
|
78
78
|
persist: {
|
|
@@ -5,7 +5,7 @@ interface State {
|
|
|
5
5
|
toggleExpanded: (projectId: string, id: string) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const selectExpandedIds: (projectId: string) => (s: State) => readonly string[];
|
|
8
|
-
export declare const useSessionExpandedStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<State>, "
|
|
8
|
+
export declare const useSessionExpandedStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<State>, "persist" | "setState"> & {
|
|
9
9
|
setState(partial: State | Partial<State> | ((state: State) => State | Partial<State>), replace?: false | undefined): unknown;
|
|
10
10
|
setState(state: State | ((state: State) => State), replace: true): unknown;
|
|
11
11
|
persist: {
|
|
@@ -75,7 +75,7 @@ export declare const selectHiddenSections: (projectId: string, surface?: Session
|
|
|
75
75
|
* to see everything should do.
|
|
76
76
|
*/
|
|
77
77
|
export declare const selectCollapsedSections: (projectId: string, surface?: SessionViewSurface) => (s: State) => string[];
|
|
78
|
-
export declare const useSessionFilterStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<State & Actions>, "
|
|
78
|
+
export declare const useSessionFilterStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<State & Actions>, "persist" | "setState"> & {
|
|
79
79
|
setState(partial: (State & Actions) | Partial<State & Actions> | ((state: State & Actions) => (State & Actions) | Partial<State & Actions>), replace?: false | undefined): unknown;
|
|
80
80
|
setState(state: (State & Actions) | ((state: State & Actions) => State & Actions), replace: true): unknown;
|
|
81
81
|
persist: {
|
|
@@ -7,7 +7,7 @@ interface State {
|
|
|
7
7
|
dismissRestore: (sessionId: string, generation: number) => void;
|
|
8
8
|
setOutOfContext: (sessionId: string, present: boolean) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const useSessionHistoryViewStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<State>, "
|
|
10
|
+
export declare const useSessionHistoryViewStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<State>, "persist" | "setState"> & {
|
|
11
11
|
setState(partial: State | Partial<State> | ((state: State) => State | Partial<State>), replace?: false | undefined): unknown;
|
|
12
12
|
setState(state: State | ((state: State) => State), replace: true): unknown;
|
|
13
13
|
persist: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Which session row's brief is showing, for the whole sidebar at once.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* `HoverCard` has no group concept — each instance owns its own delays and
|
|
6
6
|
* knows nothing about its siblings — so moving between two rows played out as
|
|
7
7
|
* "row A closes after 100ms, row B opens after 200ms": the card vanished and
|
|
8
8
|
* came back somewhere else. `Tooltip.Provider` solves this with
|
|
@@ -3,7 +3,7 @@ import { create } from 'zustand';
|
|
|
3
3
|
/**
|
|
4
4
|
* Which session row's brief is showing, for the whole sidebar at once.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* `HoverCard` has no group concept — each instance owns its own delays and
|
|
7
7
|
* knows nothing about its siblings — so moving between two rows played out as
|
|
8
8
|
* "row A closes after 100ms, row B opens after 200ms": the card vanished and
|
|
9
9
|
* came back somewhere else. `Tooltip.Provider` solves this with
|
|
@@ -41,7 +41,7 @@ interface SessionPanelMemoryState {
|
|
|
41
41
|
/** Remember what `sessionId`'s panel shows; null forgets it. */
|
|
42
42
|
remember: (sessionId: string, panel: RememberedPanel | null) => void;
|
|
43
43
|
}
|
|
44
|
-
export declare const useSessionPanelMemoryStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SessionPanelMemoryState>, "
|
|
44
|
+
export declare const useSessionPanelMemoryStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SessionPanelMemoryState>, "persist" | "setState"> & {
|
|
45
45
|
setState(partial: SessionPanelMemoryState | Partial<SessionPanelMemoryState> | ((state: SessionPanelMemoryState) => SessionPanelMemoryState | Partial<SessionPanelMemoryState>), replace?: false | undefined): unknown;
|
|
46
46
|
setState(state: SessionPanelMemoryState | ((state: SessionPanelMemoryState) => SessionPanelMemoryState), replace: true): unknown;
|
|
47
47
|
persist: {
|
|
@@ -35,7 +35,7 @@ interface SoundState {
|
|
|
35
35
|
/** Check if a specific event should play sound */
|
|
36
36
|
isEventEnabled: (event: SoundEvent) => boolean;
|
|
37
37
|
}
|
|
38
|
-
export declare const useSoundStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SoundState>, "
|
|
38
|
+
export declare const useSoundStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SoundState>, "persist" | "setState"> & {
|
|
39
39
|
setState(partial: SoundState | Partial<SoundState> | ((state: SoundState) => SoundState | Partial<SoundState>), replace?: false | undefined): unknown;
|
|
40
40
|
setState(state: SoundState | ((state: SoundState) => SoundState), replace: true): unknown;
|
|
41
41
|
persist: {
|
|
@@ -40,7 +40,7 @@ interface TabState {
|
|
|
40
40
|
/** Set the active tab */
|
|
41
41
|
setActiveTab: (tabId: string) => void;
|
|
42
42
|
}
|
|
43
|
-
export declare const useTabStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<TabState>, "
|
|
43
|
+
export declare const useTabStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<TabState>, "persist" | "setState"> & {
|
|
44
44
|
setState(partial: TabState | Partial<TabState> | ((state: TabState) => TabState | Partial<TabState>), replace?: false | undefined): unknown;
|
|
45
45
|
setState(state: TabState | ((state: TabState) => TabState), replace: true): unknown;
|
|
46
46
|
persist: {
|
|
@@ -64,7 +64,7 @@ interface UserPreferencesState {
|
|
|
64
64
|
/** Get the label for the current tab switch modifier (e.g. "Cmd" or "Ctrl") */
|
|
65
65
|
getModifierLabel: () => string;
|
|
66
66
|
}
|
|
67
|
-
export declare const useUserPreferencesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<UserPreferencesState>, "
|
|
67
|
+
export declare const useUserPreferencesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<UserPreferencesState>, "persist" | "setState"> & {
|
|
68
68
|
setState(partial: UserPreferencesState | Partial<UserPreferencesState> | ((state: UserPreferencesState) => UserPreferencesState | Partial<UserPreferencesState>), replace?: false | undefined): unknown;
|
|
69
69
|
setState(state: UserPreferencesState | ((state: UserPreferencesState) => UserPreferencesState), replace: true): unknown;
|
|
70
70
|
persist: {
|
|
@@ -31,7 +31,7 @@ interface WebNotificationState {
|
|
|
31
31
|
/** Dismiss the notification enable prompt */
|
|
32
32
|
dismissPrompt: () => void;
|
|
33
33
|
}
|
|
34
|
-
export declare const useWebNotificationStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<WebNotificationState>, "
|
|
34
|
+
export declare const useWebNotificationStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<WebNotificationState>, "persist" | "setState"> & {
|
|
35
35
|
setState(partial: WebNotificationState | Partial<WebNotificationState> | ((state: WebNotificationState) => WebNotificationState | Partial<WebNotificationState>), replace?: false | undefined): unknown;
|
|
36
36
|
setState(state: WebNotificationState | ((state: WebNotificationState) => WebNotificationState), replace: true): unknown;
|
|
37
37
|
persist: {
|