@kortix/ui 0.15.0 → 0.15.2
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/_vendor/kortix-shared.js +233 -130
- package/dist/_vendor/shared/code-language.d.ts +2 -2
- package/dist/_vendor/shared/html.d.ts +7 -0
- package/dist/_vendor/shared/index.d.ts +1 -2
- package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
- package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
- package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
- package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
- package/dist/_vendor/shared/utils/string.d.ts +6 -0
- package/dist/artifacts/artifact-frame.d.ts +0 -1
- package/dist/artifacts/artifact-frame.js +4 -10
- package/dist/artifacts/artifact-session.js +4 -7
- package/dist/artifacts/frame-policy.d.ts +1 -1
- package/dist/artifacts/frame-policy.js +2 -2
- package/dist/customize/agents/agent-page.js +5 -5
- package/dist/customize/agents/agent-status.js +1 -1
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/connectors/use-agent-access.d.ts +3 -3
- package/dist/customize/sections/connectors-view.js +50 -37
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
- package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
- package/dist/customize/sections/llm-provider/device-grant.js +27 -0
- package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
- package/dist/customize/sections/view/agent-editor.d.ts +2 -2
- package/dist/customize/sections/view/agent-editor.js +2 -2
- package/dist/customize/sections/view/review-center-connected.js +37 -6
- package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
- package/dist/customize/sections/view/secret-delivery.js +5 -4
- package/dist/customize/triggers/schedule/trigger-list.d.ts +2 -2
- package/dist/customize/triggers/schedule/trigger-list.js +12 -18
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
- package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
- package/dist/files/project/api/runtime-files.d.ts +2 -2
- package/dist/files/project/api/runtime-files.js +2 -2
- package/dist/files/project/components/drive-explorer.js +1 -1
- package/dist/files/project/components/drive-grid-view.js +0 -1
- package/dist/files/project/components/drive-list-view.js +0 -1
- package/dist/files/project/components/file-explorer-page.js +1 -1
- package/dist/files/project/hooks/index.d.ts +1 -1
- package/dist/files/project/hooks/index.js +1 -1
- package/dist/files/project/hooks/use-server-health.d.ts +1 -1
- package/dist/files/project/hooks/use-server-health.js +1 -1
- package/dist/files/project/search/workspace-search-service.d.ts +1 -1
- package/dist/files/project/search/workspace-search-service.js +1 -1
- package/dist/files/runtime/hooks/index.d.ts +1 -1
- package/dist/files/runtime/hooks/index.js +1 -1
- package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
- package/dist/files/runtime/hooks/server-health-state.js +2 -2
- package/dist/files/runtime/hooks/system-dir.js +2 -2
- package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-content.js +1 -1
- package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-list.js +3 -3
- package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
- package/dist/files/runtime/hooks/use-server-health.js +3 -3
- package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
- package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
- package/dist/files/runtime/index.d.ts +2 -2
- package/dist/files/runtime/index.js +2 -2
- package/dist/files/runtime/path-utils.d.ts +1 -1
- package/dist/files/runtime/path-utils.js +1 -1
- package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
- package/dist/files/runtime/sandbox-explorer-source.js +1 -1
- package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
- package/dist/files/runtime/sandbox-file-explorer.js +2 -2
- package/dist/files/tree/components/file-tree-item.js +0 -1
- package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
- package/dist/files/tree/hooks/use-file-events.js +1 -1
- package/dist/i18n/en.d.ts +60 -175
- package/dist/i18n/en.js +71 -186
- package/dist/internal/components/agent-mark.js +6 -0
- package/dist/internal/components/clickable-path.d.ts +3 -0
- package/dist/internal/components/clickable-path.js +4 -1
- package/dist/internal/files/file-read-retry.js +1 -1
- package/dist/internal/files/types.d.ts +2 -2
- package/dist/internal/files/types.js +2 -2
- package/dist/internal/goals/goal-meta.d.ts +33 -14
- package/dist/internal/goals/goal-meta.js +55 -13
- package/dist/internal/layout/nav-hover-card.d.ts +1 -1
- package/dist/internal/layout/nav-hover-card.js +1 -1
- package/dist/internal/layout/project-capability-nav.d.ts +1 -1
- package/dist/internal/layout/project-capability-nav.js +1 -1
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +29 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
- package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
- package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
- package/dist/internal/lib/delivered-but-disconnected.js +3 -5
- package/dist/internal/lib/error-handler.js +8 -3
- package/dist/internal/lib/pixel-mark.d.ts +4 -17
- package/dist/internal/lib/pixel-mark.js +5 -148
- package/dist/internal/lib/sounds.d.ts +4 -4
- package/dist/internal/lib/sounds.js +4 -4
- package/dist/internal/lib/trigger-clock.d.ts +5 -0
- package/dist/internal/lib/trigger-clock.js +15 -0
- package/dist/internal/lib/turn-broadcast.d.ts +0 -3
- package/dist/internal/lib/use-project-feature-flags.d.ts +2 -0
- package/dist/internal/lib/use-project-feature-flags.js +5 -5
- package/dist/internal/lib/web-notifications.d.ts +1 -8
- package/dist/internal/lib/web-notifications.js +12 -53
- package/dist/internal/notifications/notification-bell.d.ts +13 -33
- package/dist/internal/notifications/notification-bell.js +14 -117
- package/dist/internal/notifications/notification-inbox.d.ts +45 -0
- package/dist/internal/notifications/notification-inbox.js +119 -0
- package/dist/internal/notifications/notification-rows.d.ts +3 -4
- package/dist/internal/notifications/notification-rows.js +1 -4
- package/dist/internal/notifications/use-inbox-summary.d.ts +13 -0
- package/dist/internal/notifications/use-inbox-summary.js +22 -0
- package/dist/internal/notifications/web-push.d.ts +9 -10
- package/dist/internal/notifications/web-push.js +9 -10
- package/dist/internal/stores/composer-prefill-store.js +4 -1
- package/dist/internal/stores/sound-store.d.ts +4 -4
- package/dist/internal/stores/sound-store.js +10 -0
- package/dist/internal/stores/web-notification-store.d.ts +6 -9
- package/dist/internal/stores/web-notification-store.js +0 -4
- package/dist/lib/routes.d.ts +8 -0
- package/dist/lib/routes.js +4 -1
- package/dist/markdown/code/shiki-highlighter.js +14 -5
- package/dist/markdown/doc-editor/doc-menus.d.ts +1 -10
- package/dist/markdown/doc-editor/doc-menus.js +6 -69
- package/dist/markdown/file-links.js +33 -3
- package/dist/markdown/markdown-frontmatter.d.ts +6 -6
- package/dist/markdown/markdown-frontmatter.js +3 -3
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/button.js +2 -1
- package/dist/session/agents/held-messages.d.ts +1 -5
- package/dist/session/agents/held-messages.js +1 -21
- package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/composer-chat-input.d.ts +1 -1
- package/dist/session/composer/composer-chat-input.js +2 -2
- package/dist/session/composer/composer.js +16 -1
- package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
- package/dist/session/composer/hooks/use-file-search.js +16 -16
- package/dist/session/composer/menus/mention-controller.js +1 -3
- package/dist/session/composer/menus/space-mentions.d.ts +14 -4
- package/dist/session/composer/menus/space-mentions.js +17 -1
- package/dist/session/composer/use-instant-session-send.js +2 -2
- package/dist/session/header/reminder-parts.d.ts +1 -1
- package/dist/session/header/session-goal-indicator.js +4 -4
- package/dist/session/header/session-site-header.js +2 -6
- package/dist/session/panel/easy/plan-card.d.ts +2 -2
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/session-desktop.js +6 -0
- package/dist/session/panel/session-reminders-panel.js +4 -15
- package/dist/session/panel/use-session-panel-state.js +2 -2
- package/dist/session/status/sandbox-loading-boundary.js +2 -2
- package/dist/session/status/session-terminal-state.d.ts +47 -0
- package/dist/session/status/session-terminal-state.js +56 -0
- package/dist/session/thread/plan-surface.d.ts +1 -1
- package/dist/session/thread/plan-surface.js +1 -1
- package/dist/session/thread/session-chat.d.ts +1 -1
- package/dist/session/thread/session-chat.js +88 -99
- package/dist/session/thread/stop-sequence.d.ts +51 -0
- package/dist/session/thread/stop-sequence.js +55 -0
- package/dist/session/thread/transcript.d.ts +2 -2
- package/dist/session/thread/transcript.js +2 -2
- package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
- package/dist/session/tool/tools/apply-patch-tool.js +1 -1
- package/dist/session/tool/tools/kortix-action-tool.js +1 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
- package/dist/session/tool/tools/multi-agent-tools.js +1 -1
- package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-kill-tool.js +1 -1
- package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
- package/dist/session/tool/tools/pty-read-tool.js +2 -2
- package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
- package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-write-tool.js +1 -1
- package/dist/session/tool/tools/session-spawn-tool.js +7 -4
- package/dist/session/tool/tools/task-tool.js +18 -4
- package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/todo-write-tool.js +1 -1
- package/dist/session/turn/peer-message-row.d.ts +1 -10
- package/dist/session/turn/peer-message-row.js +1 -18
- package/dist/session/turn/plan-anchor.d.ts +3 -3
- package/dist/session/turn/plan-anchor.js +3 -3
- package/dist/session/turn/plan-card.d.ts +7 -7
- package/dist/session/turn/plan-card.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/terminal/terminal-card-gate.d.ts +6 -3
- package/dist/terminal/terminal-card-gate.js +21 -4
- package/dist/workspace/home/access-requests-bell.d.ts +6 -9
- package/dist/workspace/home/access-requests-bell.js +8 -10
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/layout/project-home.js +1 -2
- package/dist/workspace/review/review-center.d.ts +8 -2
- package/dist/workspace/review/review-center.js +44 -13
- package/dist/workspace/review/review-reducer.d.ts +7 -0
- package/dist/workspace/review/review-reducer.js +11 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
- package/dist/workspace/sidebar/project-nav-items.js +11 -12
- package/dist/workspace/sidebar/project-sidebar.js +2 -6
- package/dist/workspace/spaces/principal-card.d.ts +3 -1
- package/dist/workspace/spaces/principal-card.js +3 -3
- package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
- package/dist/workspace/spaces/space-agent-ask.js +36 -0
- package/dist/workspace/spaces/space-details-dialog.js +1 -1
- package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
- package/dist/workspace/spaces/space-details-panel.js +62 -8
- package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
- package/dist/workspace/spaces/space-mention-source.js +12 -19
- package/dist/workspace/spaces/space-view.js +3 -2
- package/package.json +11 -7
- package/skills/kortix-ui/references/custom-dashboard.md +1 -1
- package/skills/kortix-ui/references/modules.md +1 -1
- package/dist/_vendor/shared/artifact-annotations.d.ts +0 -311
- package/dist/_vendor/shared/artifact-comments.d.ts +0 -155
- package/dist/internal/hooks/use-notification-center.d.ts +0 -50
- package/dist/internal/hooks/use-notification-center.js +0 -151
- package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
- package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
|
@@ -2,7 +2,8 @@ import type { ProjectSpace } from '@kortix/sdk';
|
|
|
2
2
|
/**
|
|
3
3
|
* A space's details, on the right of the space (flag `chat`), opened from its
|
|
4
4
|
* name in the header: its tile, name and description, then Agents (the
|
|
5
|
-
* default first), People, Tabs and Routines, each with its own "Add"
|
|
5
|
+
* default first), People, Tabs and Routines, each with its own "Add", and
|
|
6
|
+
* Proactive (flag `spaces_proactive`). The
|
|
6
7
|
* rarer settings (make private, leave, archive, member menus) stay in the
|
|
7
8
|
* full settings dialog, one link at the end. Everything here can also be
|
|
8
9
|
* asked for in chat: the hint line says so.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { qk, useProjectConfig, useProjectSpaceMembers, useProjectTriggers } from '@kortix/sdk/react';
|
|
4
|
-
import { LightningIcon, LockSimpleIcon, PencilSimpleIcon, PlusIcon } from '@phosphor-icons/react';
|
|
3
|
+
import { qk, useFeatureFlag, useProjectConfig, useProjectSpaceMembers, useProjectSpaceProactive, useProjectTriggers, useSetProjectSpaceProactive, useUpdateProjectSpace, } from '@kortix/sdk/react';
|
|
4
|
+
import { DotsThreeIcon, LightningIcon, LockSimpleIcon, PencilSimpleIcon, PlusIcon } from '@phosphor-icons/react';
|
|
5
5
|
import { useQueryClient } from '@tanstack/react-query';
|
|
6
6
|
import { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { describeWhen, triggerName } from '../../customize/triggers/schedule/schedule-copy.js';
|
|
@@ -12,8 +12,11 @@ import { Close } from '../../icons/close.js';
|
|
|
12
12
|
import { AgentMark } from '../../internal/components/agent-mark.js';
|
|
13
13
|
import { uiRoutes } from '../../lib/routes.js';
|
|
14
14
|
import { Button } from '../../primitives/button.js';
|
|
15
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from '../../primitives/dropdown-menu.js';
|
|
15
16
|
import Hint from '../../primitives/hint.js';
|
|
16
17
|
import { Label } from '../../primitives/label.js';
|
|
18
|
+
import { Switch } from '../../primitives/switch.js';
|
|
19
|
+
import { errorToast, successToast } from '../../primitives/toast.js';
|
|
17
20
|
import { UserAvatar } from '../../primitives/user-avatar.js';
|
|
18
21
|
import { UiLink as Link, useUiViewer } from '../../providers/ui-provider.js';
|
|
19
22
|
import { PrincipalRow } from './principal-card.js';
|
|
@@ -25,7 +28,8 @@ import { agentLabel } from './space-timeline.js';
|
|
|
25
28
|
/**
|
|
26
29
|
* A space's details, on the right of the space (flag `chat`), opened from its
|
|
27
30
|
* name in the header: its tile, name and description, then Agents (the
|
|
28
|
-
* default first), People, Tabs and Routines, each with its own "Add"
|
|
31
|
+
* default first), People, Tabs and Routines, each with its own "Add", and
|
|
32
|
+
* Proactive (flag `spaces_proactive`). The
|
|
29
33
|
* rarer settings (make private, leave, archive, member menus) stay in the
|
|
30
34
|
* full settings dialog, one link at the end. Everything here can also be
|
|
31
35
|
* asked for in chat: the hint line says so.
|
|
@@ -49,7 +53,7 @@ export function SpaceDetailsPanel({ projectId, space, name, onClose, onOpenTab,
|
|
|
49
53
|
if (canAdd)
|
|
50
54
|
setAdding(true);
|
|
51
55
|
}
|
|
52
|
-
return (_jsxs("aside", { "aria-label": t('title', { name }), className: "bg-background flex min-h-0 w-full flex-1 flex-col", children: [_jsxs("div", { className: "kx-titlebar-row relative flex shrink-0 items-center gap-2 px-2", children: [_jsx("div", { className: "kx-titlebar-tabs flex h-12 min-w-0 flex-1 items-center px-3", children: _jsx("h2", { className: "text-sm font-medium", children: t('heading') }) }), _jsx(Hint, { label: t('close'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-md", "aria-label": t('close'), onClick: onClose, children: _jsx(Close, {}) }) })] }), _jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [_jsxs("div", { className: "flex flex-col items-center gap-2 px-6 pt-2 pb-6 text-center", children: [_jsx(SpaceAvatar, { space: space, size: "xl", label: name, projectId: projectId }), _jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("h3", { className: "truncate text-lg font-semibold", children: name }), isPrivateSpace(space) ? (_jsx(LockSimpleIcon, { role: "img", "aria-label": t('private'), className: "text-muted-foreground size-3.5 shrink-0" })) : null, onRename && editable ? (_jsx(Hint, { label: t('rename'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-sm", className: "text-muted-foreground", "aria-label": t('rename'), onClick: onRename, children: _jsx(PencilSimpleIcon, { className: "size-3.5" }) }) })) : null] }), _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: space.description || (isPersonalSpace(space) ? t('personalDescription') : isPrivateSpace(space) ? t('privateDescription') : t('noDescription')) })] }), _jsxs("div", { className: "space-y-6 px-4 pb-6", children: [_jsx(AgentsSection, { projectId: projectId, space: space,
|
|
56
|
+
return (_jsxs("aside", { "aria-label": t('title', { name }), className: "bg-background flex min-h-0 w-full flex-1 flex-col", children: [_jsxs("div", { className: "kx-titlebar-row relative flex shrink-0 items-center gap-2 px-2", children: [_jsx("div", { className: "kx-titlebar-tabs flex h-12 min-w-0 flex-1 items-center px-3", children: _jsx("h2", { className: "text-sm font-medium", children: t('heading') }) }), _jsx(Hint, { label: t('close'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-md", "aria-label": t('close'), onClick: onClose, children: _jsx(Close, {}) }) })] }), _jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [_jsxs("div", { className: "flex flex-col items-center gap-2 px-6 pt-2 pb-6 text-center", children: [_jsx(SpaceAvatar, { space: space, size: "xl", label: name, projectId: projectId }), _jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("h3", { className: "truncate text-lg font-semibold", children: name }), isPrivateSpace(space) ? (_jsx(LockSimpleIcon, { role: "img", "aria-label": t('private'), className: "text-muted-foreground size-3.5 shrink-0" })) : null, onRename && editable ? (_jsx(Hint, { label: t('rename'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-sm", className: "text-muted-foreground", "aria-label": t('rename'), onClick: onRename, children: _jsx(PencilSimpleIcon, { className: "size-3.5" }) }) })) : null] }), _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: space.description || (isPersonalSpace(space) ? t('personalDescription') : isPrivateSpace(space) ? t('privateDescription') : t('noDescription')) })] }), _jsxs("div", { className: "space-y-6 px-4 pb-6", children: [_jsx(AgentsSection, { projectId: projectId, space: space, editable: !!channel && editable }), _jsx("div", { ref: peopleRef, className: "scroll-mt-2", children: _jsx(PeopleSection, { projectId: projectId, space: space, members: members.data?.members, onAdd: canAdd ? () => setAdding(true) : undefined }) }), _jsx(TabsSection, { projectId: projectId, space: space, onOpenTab: onOpenTab }), _jsx(RoutinesSection, { projectId: projectId, space: space }), _jsx(ProactiveSection, { projectId: projectId, space: space }), onOpenSettings ? (_jsx(Button, { variant: "ghost", size: "sm", className: "text-muted-foreground hover:text-foreground", onClick: onOpenSettings, children: t('allSettings') })) : null] })] }), _jsx("p", { className: "text-muted-foreground shrink-0 border-t px-5 py-3 text-xs text-pretty", children: t('askHint') }), channel ? (_jsx(AddChannelMembersDialog, { projectId: projectId, space: channel, open: adding, onOpenChange: setAdding })) : null] }));
|
|
53
57
|
}
|
|
54
58
|
/** A section: its label, its rows, then its "Add" when the viewer may add. */
|
|
55
59
|
function Section({ title, add, children }) {
|
|
@@ -66,15 +70,35 @@ function Row({ avatar, name, tag, href, card, }) {
|
|
|
66
70
|
function AddButton({ label, onClick }) {
|
|
67
71
|
return (_jsxs(Button, { variant: "ghost", size: "sm", className: "text-muted-foreground hover:text-foreground gap-1.5", onClick: onClick, children: [_jsx(PlusIcon, { className: "size-3.5 shrink-0" }), label] }));
|
|
68
72
|
}
|
|
69
|
-
/**
|
|
70
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The space's agents, the default first: the agents its threads hand work to
|
|
75
|
+
* (the router routes only to them). A channel's editor makes one the default
|
|
76
|
+
* (moves it first), removes one, and adds a project agent from a picker.
|
|
77
|
+
*/
|
|
78
|
+
function AgentsSection({ projectId, space, editable }) {
|
|
71
79
|
const t = useTranslations('spaces.panel');
|
|
80
|
+
const tDetails = useTranslations('spaces.details');
|
|
72
81
|
const config = useProjectConfig(projectId);
|
|
73
|
-
const
|
|
82
|
+
const update = useUpdateProjectSpace(projectId);
|
|
83
|
+
const projectDefault = config?.default_agent ?? null;
|
|
74
84
|
const agents = space.kind === 'dm' ? (space.dm_agent_name ? [space.dm_agent_name] : []) : (space.agents ?? []);
|
|
75
85
|
// No agent list: a new thread starts on the project's default agent.
|
|
76
86
|
const shown = agents.length > 0 ? agents : projectDefault ? [projectDefault] : [];
|
|
77
|
-
|
|
87
|
+
const spaceName = space.slug ?? space.name;
|
|
88
|
+
const addable = (config?.agents ?? [])
|
|
89
|
+
.filter((agent) => !agent.hidden && agent.enabled !== false && agent.mode !== 'subagent')
|
|
90
|
+
.filter((agent) => !agents.includes(agent.name));
|
|
91
|
+
const save = (next, done) => update.mutate({ spaceId: space.space_id, input: { agents: next } }, { onSuccess: () => successToast(done), onError: () => errorToast(tDetails('agentsFailed')) });
|
|
92
|
+
const add = editable ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "sm", className: "text-muted-foreground hover:text-foreground gap-1.5", disabled: update.isPending, children: [_jsx(PlusIcon, { className: "size-3.5 shrink-0" }), t('addAgent')] }) }), _jsx(DropdownMenuContent, { align: "start", className: "w-64", children: addable.length === 0 ? (_jsx(DropdownMenuLabel, { className: "text-muted-foreground text-xs font-normal", children: t('noAgentsToAdd') })) : (addable.map((agent) => (_jsxs(DropdownMenuItem, { className: "gap-2.5", onSelect: () =>
|
|
93
|
+
// An empty list ran on the project's default: adding keeps that agent first, so the default does not move.
|
|
94
|
+
save(agents.length === 0 && projectDefault && projectDefault !== agent.name ? [projectDefault, agent.name] : [...agents, agent.name], tDetails('agentAdded', { agent: agentLabel(agent.name), name: spaceName })), children: [_jsx(AgentMark, { slug: agent.name, size: 21 }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-sm", children: agentLabel(agent.name) }), agent.description ? _jsx("span", { className: "text-muted-foreground truncate text-xs", children: agent.description }) : null] })] }, agent.name)))) })] })) : null;
|
|
95
|
+
return (_jsx(Section, { title: t('agents'), add: add, children: shown.map((agent, index) => {
|
|
96
|
+
const label = agentLabel(agent);
|
|
97
|
+
const isDefault = index === 0;
|
|
98
|
+
// The project's default stands in for an empty list: nothing to move or remove.
|
|
99
|
+
const listed = agents.includes(agent);
|
|
100
|
+
return (_jsx(PrincipalRow, { projectId: projectId, principal: { kind: 'agent', name: agent }, avatar: _jsx(AgentMark, { slug: agent, size: 21 }), name: label, tag: isDefault ? (listed ? t('default') : t('projectDefault')) : null, actions: editable && listed ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-sm", className: "text-muted-foreground shrink-0", "aria-label": tDetails('agentMenu', { agent: label }), disabled: update.isPending, children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [isDefault ? null : (_jsx(DropdownMenuItem, { onSelect: () => save([agent, ...agents.filter((item) => item !== agent)], tDetails('defaultSet', { agent: label, name: spaceName })), children: tDetails('makeDefault') })), _jsx(DropdownMenuItem, { onSelect: () => save(agents.filter((item) => item !== agent), tDetails('agentRemoved', { agent: label, name: spaceName })), children: tDetails('removeAgent', { name: spaceName }) })] })] })) : null }, agent));
|
|
101
|
+
}) }));
|
|
78
102
|
}
|
|
79
103
|
/** The space's people: its members, or only the viewer in a private space of one person. */
|
|
80
104
|
function PeopleSection({ projectId, space, members, onAdd, }) {
|
|
@@ -117,3 +141,33 @@ function RoutinesSection({ projectId, space }) {
|
|
|
117
141
|
} })] })) : null;
|
|
118
142
|
return (_jsxs(Section, { title: t('routines'), add: add, children: [routines.map((trigger) => (_jsx(Row, { avatar: _jsx(LightningIcon, { className: "text-muted-foreground size-4" }), name: triggerName(trigger), tag: describeWhen(trigger), href: uiRoutes().customize(projectId, `triggers?id=${encodeURIComponent(trigger.slug)}`) }, trigger.slug))), privateChannel && routines.length === 0 ? (_jsx("li", { className: "text-muted-foreground px-2 py-1 text-xs text-pretty", children: t('routinesPrivate') })) : null] }));
|
|
119
143
|
}
|
|
144
|
+
/** The browser's IANA zone, for the daily brief; UTC when it has none. */
|
|
145
|
+
function browserTimeZone() {
|
|
146
|
+
try {
|
|
147
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC';
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return 'UTC';
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/** One switch row: the name, a muted line under it, the switch at the end. */
|
|
154
|
+
function SwitchRow({ label, hint, checked, disabled, onChange, }) {
|
|
155
|
+
return (_jsxs("li", { className: "flex min-h-9 items-center gap-2.5 px-2 py-1", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "truncate text-sm", children: label }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: hint })] }), _jsx(Switch, { checked: checked, onCheckedChange: onChange, disabled: disabled, "aria-label": label, className: "shrink-0" })] }));
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Proactive (flag `spaces_proactive`): the space's watcher reads what happens
|
|
159
|
+
* here and writes only when it matters; the daily brief adds one summary at
|
|
160
|
+
* 9:00. Only the space's creator, a project manager or the DM's owner may
|
|
161
|
+
* change them (`can_edit`); everyone else sees the state.
|
|
162
|
+
*/
|
|
163
|
+
function ProactiveSection({ projectId, space }) {
|
|
164
|
+
const t = useTranslations('spaces.panel');
|
|
165
|
+
const flag = useFeatureFlag(projectId, 'spaces_proactive');
|
|
166
|
+
const settings = useProjectSpaceProactive(projectId, space.space_id, { enabled: flag.enabled });
|
|
167
|
+
const update = useSetProjectSpaceProactive(projectId, space.space_id);
|
|
168
|
+
if (!flag.enabled || !settings.data)
|
|
169
|
+
return null;
|
|
170
|
+
const { enabled, daily_brief: dailyBrief, can_edit: canEdit } = settings.data;
|
|
171
|
+
const save = (input) => update.mutate(input, { onError: () => errorToast(t('proactiveFailed')) });
|
|
172
|
+
return (_jsxs(Section, { title: t('proactive'), children: [_jsx(SwitchRow, { label: t('proactiveWatch'), hint: t('proactiveWatchHint'), checked: enabled, disabled: !canEdit || update.isPending, onChange: (next) => save({ enabled: next }) }), enabled ? (_jsx(SwitchRow, { label: t('proactiveBrief'), hint: t('proactiveBriefHint'), checked: dailyBrief, disabled: !canEdit || update.isPending, onChange: (next) => save(next ? { daily_brief: true, brief_timezone: browserTimeZone() } : { daily_brief: false }) })) : null] }));
|
|
173
|
+
}
|
|
@@ -4,8 +4,9 @@ import type { SpaceMentionSource } from '../../session/composer/menus/space-ment
|
|
|
4
4
|
export declare function mentionSlug(name: string): string;
|
|
5
5
|
/**
|
|
6
6
|
* The `@` menu of a space's composers: its people (the viewer left out) and
|
|
7
|
-
* its agents, then the project's other agents
|
|
8
|
-
*
|
|
7
|
+
* its agents, then the project's other agents (a channel only). Naming one of
|
|
8
|
+
* those never adds it: the router hands work only to the space's agents, and
|
|
9
|
+
* the composer asks after the send (`SpaceAgentAsk`). A person is mentioned by
|
|
9
10
|
* email when the directory knows it, else by display name: the forms the
|
|
10
11
|
* mention parser reads (`apps/api/src/projects/lib/space-posts.ts`).
|
|
11
12
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useProjectConfig, useProjectSpaceMembers
|
|
3
|
-
import { useMemo } from 'react';
|
|
2
|
+
import { useProjectConfig, useProjectSpaceMembers } from '@kortix/sdk/react';
|
|
3
|
+
import { createElement, useMemo } from 'react';
|
|
4
4
|
import { useTranslations } from '../../i18n/index.js';
|
|
5
5
|
import { useAccountMembers } from '../../internal/account-hub/use-account-members.js';
|
|
6
6
|
import { useBillingAccountId } from '../../internal/stores/billing-account-context.js';
|
|
7
|
-
import { errorToast, successToast } from '../../primitives/toast.js';
|
|
8
7
|
import { useUiViewerId } from '../../providers/ui-provider.js';
|
|
8
|
+
import { SpaceAgentAsk } from './space-agent-ask.js';
|
|
9
9
|
import { agentLabel } from './space-timeline.js';
|
|
10
10
|
/** A display name as one `@` token, as the server reads it: `Ana Lima` → `ana-lima`. */
|
|
11
11
|
export function mentionSlug(name) {
|
|
@@ -13,8 +13,9 @@ export function mentionSlug(name) {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* The `@` menu of a space's composers: its people (the viewer left out) and
|
|
16
|
-
* its agents, then the project's other agents
|
|
17
|
-
*
|
|
16
|
+
* its agents, then the project's other agents (a channel only). Naming one of
|
|
17
|
+
* those never adds it: the router hands work only to the space's agents, and
|
|
18
|
+
* the composer asks after the send (`SpaceAgentAsk`). A person is mentioned by
|
|
18
19
|
* email when the directory knows it, else by display name: the forms the
|
|
19
20
|
* mention parser reads (`apps/api/src/projects/lib/space-posts.ts`).
|
|
20
21
|
*/
|
|
@@ -25,7 +26,6 @@ export function useSpaceMentionSource(projectId, space) {
|
|
|
25
26
|
const channel = space?.kind === 'channel' ? space : null;
|
|
26
27
|
const members = useProjectSpaceMembers(projectId, channel?.space_id);
|
|
27
28
|
const directory = useAccountMembers(useBillingAccountId());
|
|
28
|
-
const update = useUpdateProjectSpace(projectId);
|
|
29
29
|
const roles = useTranslations('projectSelector.role');
|
|
30
30
|
return useMemo(() => {
|
|
31
31
|
if (!space)
|
|
@@ -49,7 +49,7 @@ export function useSpaceMentionSource(projectId, space) {
|
|
|
49
49
|
const describe = (name) => configAgents.find((agent) => agent.name === name)?.description ?? null;
|
|
50
50
|
const own = space.kind === 'dm' ? (space.dm_agent_name ? [space.dm_agent_name] : []) : (space.agents ?? []);
|
|
51
51
|
// No agent list: the project's default answers here, so it reads as in the space.
|
|
52
|
-
const projectDefault = config?.default_agent ??
|
|
52
|
+
const projectDefault = config?.default_agent ?? null;
|
|
53
53
|
const inSpace = own.length > 0 ? own : projectDefault ? [projectDefault] : [];
|
|
54
54
|
const agents = [
|
|
55
55
|
...inSpace.map((name) => ({ name, label: agentLabel(name), description: describe(name), inSpace: true })),
|
|
@@ -57,22 +57,15 @@ export function useSpaceMentionSource(projectId, space) {
|
|
|
57
57
|
.filter((agent) => !inSpace.includes(agent.name))
|
|
58
58
|
.map((agent) => ({ name: agent.name, label: agentLabel(agent.name), description: agent.description, inSpace: false })),
|
|
59
59
|
];
|
|
60
|
-
const name = space.
|
|
61
|
-
const canAddAgents = !!channel && channel.can_edit === true;
|
|
60
|
+
const name = `#${space.slug ?? space.name}`;
|
|
62
61
|
return {
|
|
63
62
|
people,
|
|
64
63
|
agents,
|
|
65
64
|
labels: { people: t('people'), agents: t('agents'), addToSpace: t('addToSpace', { space: name }) },
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return;
|
|
70
|
-
update.mutate({ spaceId: channel.space_id, input: { agents: [...(channel.agents ?? []), agent] } }, {
|
|
71
|
-
onSuccess: () => successToast(t('added', { agent: agentLabel(agent), space: name })),
|
|
72
|
-
onError: () => errorToast(t('addFailed')),
|
|
73
|
-
});
|
|
74
|
-
}
|
|
65
|
+
// A DM is not editable: its agent is the only one, and no other is offered.
|
|
66
|
+
renderOutsideAsk: channel
|
|
67
|
+
? (agent, done) => createElement(SpaceAgentAsk, { projectId, space: channel, agent, onDone: done })
|
|
75
68
|
: undefined,
|
|
76
69
|
};
|
|
77
|
-
}, [space, channel, members.data, directory.data, viewerId, config, t, roles,
|
|
70
|
+
}, [space, channel, members.data, directory.data, viewerId, config, t, roles, projectId]);
|
|
78
71
|
}
|
|
@@ -53,6 +53,7 @@ import { agentLabel, liveReplyCount, replyRole, spaceRoster, threadIsWorking } f
|
|
|
53
53
|
import { CHAT_TAB, openTabId } from './space-tab-list.js';
|
|
54
54
|
import { AddTabMenu, StoredTabPanel, StoredTabTrigger, useSpaceTabs } from './space-tabs.js';
|
|
55
55
|
import { SpaceTimeline, useSpaceThreads } from './space-timeline-view.js';
|
|
56
|
+
import { SessionDriveFilesScope } from '../../internal/files/session-drive-files.js';
|
|
56
57
|
/** The search and filter keys of the Threads and Links tabs. */
|
|
57
58
|
const TAB_FILTER_PARAMS = ['q', 'status', 'by', 'agent', 'active', 'pinned', 'added'];
|
|
58
59
|
/** The query key of the open thread: it survives a reload and can be linked. */
|
|
@@ -406,7 +407,7 @@ function SpaceComposer({ projectId, space, onOpenThread, onAutoOpenThread, befor
|
|
|
406
407
|
// A channel's agents lead its picker; the first one the project still offers starts a new thread.
|
|
407
408
|
const visible = useVisibleAgents({ projectId });
|
|
408
409
|
const projectConfig = useProjectConfig(projectId);
|
|
409
|
-
const projectDefault = projectConfig?.default_agent ??
|
|
410
|
+
const projectDefault = projectConfig?.default_agent ?? null;
|
|
410
411
|
// A member with no agent grant still posts here with the channel's agents.
|
|
411
412
|
const runnable = useMemo(() => channelRunnableAgents(space, projectDefault), [space, projectDefault]);
|
|
412
413
|
const offered = useMemo(() => [...visible, ...runnable.filter((name) => !visible.some((a) => a.name === name)).map((name) => ({ name }))], [visible, runnable]);
|
|
@@ -487,7 +488,7 @@ function ThreadPanel({ projectId, sessionId, context, thread, agentFallback, onC
|
|
|
487
488
|
// A talk-only thread: "Show work" opens its worker sessions.
|
|
488
489
|
front: thread?.metadata?.kortix_front === true,
|
|
489
490
|
}), [agentName, thread, t, messagesOnly, projectId]);
|
|
490
|
-
return (_jsxs("aside", { "aria-label": t('threadTitle'), "data-thread-panel": "", className: "bg-background flex min-h-0 w-full flex-1 flex-col", children: [_jsxs("div", { className: "kx-titlebar-row relative flex shrink-0 items-center gap-2 border-b px-2", children: [_jsx("div", { className: "kx-titlebar-tabs flex h-12 min-w-0 flex-1 items-center px-3", children: _jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [_jsx("h2", { className: "text-base font-semibold", children: t('threadTitle') }), _jsx("button", { type: "button", onClick: onClose, className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring min-w-0 truncate rounded-sm text-xs outline-none hover:underline focus-visible:ring-2", children: context })] }) }), fullHref ? (_jsx(Link, { href: fullHref, className: "text-muted-foreground hover:text-foreground shrink-0 px-2 text-xs", children: t('openFullSession') })) : null, _jsx(Hint, { label: t('closeThread'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-md", "aria-label": t('closeThread'), onClick: onClose, children: _jsx(Close, {}) }) })] }), replyCount && dividerOnTop ? (_jsxs("div", { className: "shrink-0 pt-3", children: [_jsx(RepliesDivider, { count: replyCount }), messagesOnly ? null : (_jsx(UsedMemoryChip, { projectId: projectId, sessionId: sessionId, ready: turnDone, className: "px-5" }))] })) : null, _jsx(TranscriptRowsContext.Provider, { value: rows, children: _jsx(AfterFirstPromptContext.Provider, { value: afterFirstPrompt, children: _jsx(ComposerAutoFocusContext.Provider, { value: !quietFocus, children: _jsx(SessionThread, { session: session, hideHeader: true, composerPlaceholder: t('replyPlaceholder'), className: "min-h-0 flex-1" }) }) }) })] }));
|
|
491
|
+
return (_jsxs("aside", { "aria-label": t('threadTitle'), "data-thread-panel": "", className: "bg-background flex min-h-0 w-full flex-1 flex-col", children: [_jsx(SessionDriveFilesScope, { projectId: projectId, sessionId: sessionId }), _jsxs("div", { className: "kx-titlebar-row relative flex shrink-0 items-center gap-2 border-b px-2", children: [_jsx("div", { className: "kx-titlebar-tabs flex h-12 min-w-0 flex-1 items-center px-3", children: _jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [_jsx("h2", { className: "text-base font-semibold", children: t('threadTitle') }), _jsx("button", { type: "button", onClick: onClose, className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring min-w-0 truncate rounded-sm text-xs outline-none hover:underline focus-visible:ring-2", children: context })] }) }), fullHref ? (_jsx(Link, { href: fullHref, className: "text-muted-foreground hover:text-foreground shrink-0 px-2 text-xs", children: t('openFullSession') })) : null, _jsx(Hint, { label: t('closeThread'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-md", "aria-label": t('closeThread'), onClick: onClose, children: _jsx(Close, {}) }) })] }), replyCount && dividerOnTop ? (_jsxs("div", { className: "shrink-0 pt-3", children: [_jsx(RepliesDivider, { count: replyCount }), messagesOnly ? null : (_jsx(UsedMemoryChip, { projectId: projectId, sessionId: sessionId, ready: turnDone, className: "px-5" }))] })) : null, _jsx(TranscriptRowsContext.Provider, { value: rows, children: _jsx(AfterFirstPromptContext.Provider, { value: afterFirstPrompt, children: _jsx(ComposerAutoFocusContext.Provider, { value: !quietFocus, children: _jsx(SessionThread, { session: session, hideHeader: true, composerPlaceholder: t('replyPlaceholder'), className: "min-h-0 flex-1" }) }) }) })] }));
|
|
491
492
|
}
|
|
492
493
|
/**
|
|
493
494
|
* Where "Open full session" goes. A talk-only thread (`chat_front`, server
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kortix/ui",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Kortix UI: the shared React component library for apps/web, Kortix Apps and SDK hosts. Tailwind v4 classes, themed by CSS variables.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -1003,10 +1003,6 @@
|
|
|
1003
1003
|
"types": "./dist/internal/hooks/use-debounced-value.d.ts",
|
|
1004
1004
|
"import": "./dist/internal/hooks/use-debounced-value.js"
|
|
1005
1005
|
},
|
|
1006
|
-
"./internal/hooks/use-notification-center": {
|
|
1007
|
-
"types": "./dist/internal/hooks/use-notification-center.d.ts",
|
|
1008
|
-
"import": "./dist/internal/hooks/use-notification-center.js"
|
|
1009
|
-
},
|
|
1010
1006
|
"./internal/hooks/use-slash-focus": {
|
|
1011
1007
|
"types": "./dist/internal/hooks/use-slash-focus.d.ts",
|
|
1012
1008
|
"import": "./dist/internal/hooks/use-slash-focus.js"
|
|
@@ -1267,6 +1263,10 @@
|
|
|
1267
1263
|
"types": "./dist/internal/notifications/notification-bell.d.ts",
|
|
1268
1264
|
"import": "./dist/internal/notifications/notification-bell.js"
|
|
1269
1265
|
},
|
|
1266
|
+
"./internal/notifications/notification-inbox": {
|
|
1267
|
+
"types": "./dist/internal/notifications/notification-inbox.d.ts",
|
|
1268
|
+
"import": "./dist/internal/notifications/notification-inbox.js"
|
|
1269
|
+
},
|
|
1270
1270
|
"./internal/notifications/notification-rows": {
|
|
1271
1271
|
"types": "./dist/internal/notifications/notification-rows.d.ts",
|
|
1272
1272
|
"import": "./dist/internal/notifications/notification-rows.js"
|
|
@@ -1275,6 +1275,10 @@
|
|
|
1275
1275
|
"types": "./dist/internal/notifications/session-toast-cards.d.ts",
|
|
1276
1276
|
"import": "./dist/internal/notifications/session-toast-cards.js"
|
|
1277
1277
|
},
|
|
1278
|
+
"./internal/notifications/use-inbox-summary": {
|
|
1279
|
+
"types": "./dist/internal/notifications/use-inbox-summary.d.ts",
|
|
1280
|
+
"import": "./dist/internal/notifications/use-inbox-summary.js"
|
|
1281
|
+
},
|
|
1278
1282
|
"./internal/notifications/web-push": {
|
|
1279
1283
|
"types": "./dist/internal/notifications/web-push.d.ts",
|
|
1280
1284
|
"import": "./dist/internal/notifications/web-push.js"
|
|
@@ -2189,7 +2193,7 @@
|
|
|
2189
2193
|
"@extend-ai/react-docx": "^0.7.5",
|
|
2190
2194
|
"@extend-ai/react-xlsx": "0.13.4",
|
|
2191
2195
|
"@glideapps/glide-data-grid": "6.0.4-alpha24",
|
|
2192
|
-
"@kortix/llm-catalog": "0.15.
|
|
2196
|
+
"@kortix/llm-catalog": "0.15.2",
|
|
2193
2197
|
"@lezer/highlight": "1.2.3",
|
|
2194
2198
|
"@paper-design/shaders-react": "^0.0.76",
|
|
2195
2199
|
"@phosphor-icons/react": "2.1.10",
|
|
@@ -2288,7 +2292,7 @@
|
|
|
2288
2292
|
"yaml": "^2.8.2"
|
|
2289
2293
|
},
|
|
2290
2294
|
"peerDependencies": {
|
|
2291
|
-
"@kortix/sdk": "^0.15.
|
|
2295
|
+
"@kortix/sdk": "^0.15.2",
|
|
2292
2296
|
"@tanstack/react-query": "^5.75.2",
|
|
2293
2297
|
"@types/react": ">=18",
|
|
2294
2298
|
"react": ">=19",
|
|
@@ -202,7 +202,7 @@ A Next.js host passes `next/link` and `{ useRouter, usePathname, useSearchParams
|
|
|
202
202
|
|
|
203
203
|
## 5. The project shell
|
|
204
204
|
|
|
205
|
-
Your sidebar chrome around Kortix's session list. Every URL the components link to comes from one route table, `setUiRoutes` (`@kortix/ui`), called once at module load. The defaults are Kortix's own paths: `project` `/projects/<id>`, `session` `/projects/<id>/sessions/<sessionId>`, `sessions` `/projects/<id>/sessions` (`?view=archived|deleted`), `files` `/projects/<id>/files`, `drive` `/projects/<id>/drive`, `apps` `/projects/<id>/apps`, `members` `/projects/<id>/members`, `sandboxSettings` `/projects/<id>/admin/sandbox`, `customize` `/projects/<id>/customize/<page>` (agents, skills, connectors, triggers, reminders, models, secrets, review, settings), `admin` `/projects/<id>/admin/<section>` (it follows `customize` when you map only `customize`), `goals` `/projects/<id>/goals` (flag `goals`), `artifacts` `/projects/<id>/artifacts
|
|
205
|
+
Your sidebar chrome around Kortix's session list. Every URL the components link to comes from one route table, `setUiRoutes` (`@kortix/ui`), called once at module load. The defaults are Kortix's own paths: `project` `/projects/<id>`, `session` `/projects/<id>/sessions/<sessionId>`, `sessions` `/projects/<id>/sessions` (`?view=archived|deleted`), `files` `/projects/<id>/files`, `drive` `/projects/<id>/drive`, `apps` `/projects/<id>/apps`, `members` `/projects/<id>/members`, `sandboxSettings` `/projects/<id>/admin/sandbox`, `customize` `/projects/<id>/customize/<page>` (agents, skills, connectors, triggers, reminders, models, secrets, review, settings), `admin` `/projects/<id>/admin/<section>` (it follows `customize` when you map only `customize`), `goals` `/projects/<id>/goals` (flag `goals`), `artifacts` `/projects/<id>/artifacts`, and, while the project's `chat` flag is on, `space` `/projects/<id>/spaces/<slug>`, `memory` `/projects/<id>/memory`, `channel` `/projects/<id>/c/<slug>` and `dm` `/projects/<id>/dm/<agent>`. Return your own path for a page you serve elsewhere. Return `null` for a page you do not serve: every link to it is hidden. `project`, `session`, `channel` and `dm` cannot be null. This app serves the project
|
|
206
206
|
home, its files and a session (section 7), so it maps the other pages to `null`.
|
|
207
207
|
|
|
208
208
|
```tsx
|
|
@@ -395,7 +395,7 @@ export function Sessions({ projectId }: { projectId: string }) {
|
|
|
395
395
|
}
|
|
396
396
|
```
|
|
397
397
|
|
|
398
|
-
Goals (behind the `goals` flag): `GoalStatusBadge` (a goal's status), `GoalHealthDot` (green running, orange needs attention, grey closed), `useGoalIssueText` (one sentence per health issue), `goalProgress` (met and total criteria), `goalOpenAsks` (asks waiting on a person), `goalNeedsYou` (an open ask or a health issue), `formatGoalTime` (the reminders time format), `goalHref` (the goal's page, or null), `useGoalClock` (the current time, re-read every 30 s), `goalNeedsAttention` (a health issue no person was asked about), `goalLastWake` (when the goal last woke), `goalAssignedTo` (the goal is for this person), `useGoalPerson` (who a goal is for, by name), `useStartGoal` (starts a goal: a session that writes GOAL.md), `goalPaused` (the goal is paused), `useGoalStateText` (a goal state's label), `goalIconState` and `goalStatusIconState` (the `GoalIconState` of a goal or a status), `GoalStatusIcon` (that state's icon), `GoalCriteriaProgress` (met criteria, optionally as a ring), `GoalPersonChip` (the person a goal is for).
|
|
398
|
+
Goals (behind the `goals` flag): `GoalStatusBadge` (a goal's status), `GoalHealthDot` (green running, orange needs attention, grey closed), `useGoalIssueText` (one sentence per health issue), `goalProgress` (met and total criteria), `goalOpenAsks` (asks waiting on a person), `goalNeedsYou` (an open ask or a health issue), `formatGoalTime` (the reminders time format), `goalHref` (the goal's page, or null), `useGoalClock` (the current time, re-read every 30 s), `goalNeedsAttention` (a health issue no person was asked about), `goalLastWake` (when the goal last woke), `goalAssignedTo` (the goal is for this person), `useGoalPerson` (who a goal is for, by name), `useStartGoal` (starts a goal: a session that writes GOAL.md), `goalPaused` (the goal is paused), `useGoalStateText` (a goal state's label), `goalIconState` and `goalStatusIconState` (the `GoalIconState` of a goal or a status), `GoalStatusIcon` (that state's icon), `GoalCriteriaProgress` (met criteria, optionally as a ring), `GoalPersonChip` (the person a goal is for), `goalNextWake` (when the goal wakes next, or null while paused or waiting), `useGoalBlockedNextStep` (the next step a person takes for a blocked goal), `goalCriteriaStatus` (criteria reported met, verified by the verifier, and the total).
|
|
399
399
|
|
|
400
400
|
Channels and memory (behind the `chat` flag): `SpaceView` (`projectId`, `target`: a `SpaceTarget`, `{ kind: 'channel', slug }` or `{ kind: 'dm', agentName }`; `beforeSend`; `renderFolder` draws a `SpaceFolder`, one space's Files tab, whose entries are `SpaceFile`s; `isHtmlPath` says a tab's file opens as a page; `renderApps`) is a channel or DM page with its threads, files, memory, apps, links and triggers. `ChannelGlyph` (`visibility`) is `#` or a lock. `agentLabel` (`name`) is an agent's display name. `MemoryView` (`projectId`, `layerKey`: `company` or a space id, `place`) is one memory layer's pages; `CompanyMemoryPage` (`projectId`) is the project's Company memory. `useMemoryPageHref` (`projectId`) returns `(layer: MemoryLayerRef, pageId) => href | null`: the page's link, null when the host serves no such page.
|
|
401
401
|
|