@kortix/ui 0.14.7 → 0.14.8

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.
Files changed (78) hide show
  1. package/dist/_vendor/kortix-shared.js +1 -1
  2. package/dist/_vendor/shared/runtime-versions.d.ts +4 -0
  3. package/dist/access/access/access-dialog-share.js +4 -7
  4. package/dist/access/access/access-dialog.js +2 -1
  5. package/dist/access/access/principal-picker.js +6 -5
  6. package/dist/customize/agents/agent-cover-card.d.ts +17 -0
  7. package/dist/customize/agents/agent-cover-card.js +13 -0
  8. package/dist/customize/agents/agent-page.js +6 -33
  9. package/dist/customize/agents/agents-page.js +43 -49
  10. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +1 -0
  11. package/dist/customize/migrate-to-v2/migration-prompt.js +1 -0
  12. package/dist/customize/sections/view/channels-view.js +2 -6
  13. package/dist/customize/shared/new-entity-menu.js +4 -1
  14. package/dist/customize/skills/skills-page.js +4 -5
  15. package/dist/customize/triggers/schedule/then-fields.js +1 -5
  16. package/dist/customize/triggers/schedule-view.js +4 -2
  17. package/dist/i18n/en.d.ts +60 -12
  18. package/dist/i18n/en.js +62 -14
  19. package/dist/internal/components/agent-mark.d.ts +38 -0
  20. package/dist/internal/components/agent-mark.js +38 -0
  21. package/dist/internal/lib/pixel-mark.d.ts +33 -0
  22. package/dist/internal/lib/pixel-mark.js +152 -0
  23. package/dist/internal/lib/use-project-feature-flags.js +3 -3
  24. package/dist/markdown/genui/components/inline.d.ts +1 -1
  25. package/dist/markdown/setup-links/app-credentials-form.d.ts +12 -0
  26. package/dist/markdown/setup-links/app-credentials-form.js +115 -0
  27. package/dist/markdown/setup-links/secret-intake-form.d.ts +10 -0
  28. package/dist/markdown/setup-links/secret-intake-form.js +1 -1
  29. package/dist/primitives/entity-avatar.d.ts +4 -1
  30. package/dist/primitives/entity-avatar.js +4 -2
  31. package/dist/primitives/user-avatar.d.ts +3 -1
  32. package/dist/primitives/user-avatar.js +4 -2
  33. package/dist/providers/ui-provider.d.ts +1 -1
  34. package/dist/session/composer/agent-selector.d.ts +7 -1
  35. package/dist/session/composer/agent-selector.js +20 -10
  36. package/dist/session/composer/context-usage.d.ts +5 -0
  37. package/dist/session/composer/context-usage.js +6 -1
  38. package/dist/session/composer/token-progress.js +4 -4
  39. package/dist/session/header/export-transcript-modal.d.ts +3 -2
  40. package/dist/session/header/export-transcript-modal.js +6 -3
  41. package/dist/session/models/model-selector.d.ts +3 -1
  42. package/dist/session/models/model-selector.js +3 -2
  43. package/dist/session/panel/easy/plan-card.d.ts +2 -0
  44. package/dist/session/panel/easy/plan-card.js +2 -0
  45. package/dist/session/thread/plan-surface.d.ts +1 -0
  46. package/dist/session/thread/plan-surface.js +1 -0
  47. package/dist/session/thread/session-chat.js +2 -2
  48. package/dist/session/thread/session-context-metrics.d.ts +15 -0
  49. package/dist/session/thread/session-context-metrics.js +10 -1
  50. package/dist/session/thread/session-context-modal.d.ts +4 -2
  51. package/dist/session/thread/session-context-modal.js +16 -9
  52. package/dist/session/thread/transcript.d.ts +4 -0
  53. package/dist/session/thread/transcript.js +18 -5
  54. package/dist/session/thread/turn-share.d.ts +16 -0
  55. package/dist/session/thread/turn-share.js +162 -0
  56. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -0
  57. package/dist/session/tool/tools/apply-patch-tool.js +1 -0
  58. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -0
  59. package/dist/session/tool/tools/pty-kill-tool.js +1 -0
  60. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -0
  61. package/dist/session/tool/tools/pty-read-tool.js +2 -0
  62. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -0
  63. package/dist/session/tool/tools/pty-spawn-tool.js +1 -0
  64. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -0
  65. package/dist/session/tool/tools/pty-write-tool.js +1 -0
  66. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -0
  67. package/dist/session/tool/tools/todo-write-tool.js +1 -0
  68. package/dist/session/turn/message-author-label.js +6 -2
  69. package/dist/session/turn/plan-anchor.d.ts +3 -0
  70. package/dist/session/turn/plan-anchor.js +3 -0
  71. package/dist/session/turn/plan-card.d.ts +7 -0
  72. package/dist/session/turn/plan-card.js +7 -0
  73. package/dist/styles.css +1 -1
  74. package/dist/terminal/session-terminal-connect-bar.js +2 -1
  75. package/dist/workspace/sidebar/session-brief-hover-card.js +28 -1
  76. package/package.json +11 -3
  77. package/dist/customize/agents/agent-nav.prototype.d.ts +0 -35
  78. package/dist/customize/agents/agent-nav.prototype.js +0 -95
@@ -25,7 +25,8 @@ export function SessionTerminalConnectBar({ projectSessionId }) {
25
25
  export function SessionTerminalConnectSteps({ id, projectSessionId, }) {
26
26
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
27
27
  const installCmd = useDeploymentCliInstallCommand(undefined);
28
- const connectCmd = `kortix sessions connect ${projectSessionId}`;
28
+ // A shell through the Kortix PTY: it works on every harness. `sessions connect` attaches OpenCode's own TUI and fails on pi.
29
+ const connectCmd = `kortix sessions shell ${projectSessionId}`;
29
30
  return (_jsxs("ol", { id: id, className: "space-y-3 pr-1.5 pb-3 pl-3", children: [_jsx(CommandStep, { label: tI18nComplete.raw('textd236e9cd730b'), command: installCmd }), _jsx(CommandStep, { label: tI18nComplete.raw('text842bad27af42'), command: connectCmd })] }));
30
31
  }
31
32
  function CommandStep({ label, command }) {
@@ -150,6 +150,33 @@ export function SessionBriefCardHost() {
150
150
  el.style.transform = `translate(${rect.right}px, ${top}px)`;
151
151
  shown.current = true;
152
152
  }, [visible, activeSessionId, anchor, via]);
153
+ // Native listeners, not React's `onPointerEnter/Leave`. The card's content is
154
+ // portaled in from the row, so in React's tree it is the row's child, not
155
+ // this wrapper's: React fired the wrapper's leave the moment the pointer
156
+ // crossed from the gap onto the content, and the card closed under a pointer
157
+ // on its way to the Review link. The DOM tree is the one the pointer is in.
158
+ useEffect(() => {
159
+ const el = wrapperRef.current;
160
+ if (!el)
161
+ return;
162
+ const active = () => useSessionHoverStore.getState().activeSessionId;
163
+ const onEnter = () => {
164
+ const id = active();
165
+ if (id)
166
+ openSession(id);
167
+ };
168
+ const onLeave = () => {
169
+ const id = active();
170
+ if (id)
171
+ closeSession(id);
172
+ };
173
+ el.addEventListener('pointerenter', onEnter);
174
+ el.addEventListener('pointerleave', onLeave);
175
+ return () => {
176
+ el.removeEventListener('pointerenter', onEnter);
177
+ el.removeEventListener('pointerleave', onLeave);
178
+ };
179
+ }, [openSession, closeSession]);
153
180
  // WCAG 1.4.13: dismissible without moving the pointer. A scroll moves the
154
181
  // row away from the card, so it closes too, unless it scrolls the card itself.
155
182
  useEffect(() => {
@@ -169,7 +196,7 @@ export function SessionBriefCardHost() {
169
196
  window.removeEventListener('resize', dismiss);
170
197
  };
171
198
  }, [visible, dismiss]);
172
- return createPortal(_jsx("div", { ref: wrapperRef, "data-slot": "session-brief-card", className: cn('fixed top-0 left-0 pl-3.5 starting:opacity-0', !visible && 'hidden'), style: { zIndex: floatingZ(depth) }, onPointerEnter: () => activeSessionId && openSession(activeSessionId), onPointerLeave: () => activeSessionId && closeSession(activeSessionId), children: _jsx("div", { ref: setSlot, className: cn(FLOATING_PANEL_SURFACE, 'w-72 overflow-hidden rounded-md shadow-xs') }) }), container ?? document.body);
199
+ return createPortal(_jsx("div", { ref: wrapperRef, "data-slot": "session-brief-card", className: cn('fixed top-0 left-0 pl-3.5 starting:opacity-0', !visible && 'hidden'), style: { zIndex: floatingZ(depth) }, children: _jsx("div", { ref: setSlot, className: cn(FLOATING_PANEL_SURFACE, 'w-72 overflow-hidden rounded-md shadow-xs') }) }), container ?? document.body);
173
200
  }
174
201
  /**
175
202
  * A row's trigger plus its brief, rendered into the shared card while the row
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/ui",
3
- "version": "0.14.7",
3
+ "version": "0.14.8",
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",
@@ -911,6 +911,10 @@
911
911
  "types": "./dist/internal/capture/use-capture-area.d.ts",
912
912
  "import": "./dist/internal/capture/use-capture-area.js"
913
913
  },
914
+ "./internal/components/agent-mark": {
915
+ "types": "./dist/internal/components/agent-mark.d.ts",
916
+ "import": "./dist/internal/components/agent-mark.js"
917
+ },
914
918
  "./internal/components/hover-prefetch-link": {
915
919
  "types": "./dist/internal/components/hover-prefetch-link.d.ts",
916
920
  "import": "./dist/internal/components/hover-prefetch-link.js"
@@ -1463,6 +1467,10 @@
1463
1467
  "types": "./dist/markdown/setup-links/api-base.d.ts",
1464
1468
  "import": "./dist/markdown/setup-links/api-base.js"
1465
1469
  },
1470
+ "./markdown/setup-links/app-credentials-form": {
1471
+ "types": "./dist/markdown/setup-links/app-credentials-form.d.ts",
1472
+ "import": "./dist/markdown/setup-links/app-credentials-form.js"
1473
+ },
1466
1474
  "./markdown/setup-links/approval-decision": {
1467
1475
  "types": "./dist/markdown/setup-links/approval-decision.d.ts",
1468
1476
  "import": "./dist/markdown/setup-links/approval-decision.js"
@@ -2157,7 +2165,7 @@
2157
2165
  "@extend-ai/react-docx": "^0.7.5",
2158
2166
  "@extend-ai/react-xlsx": "0.13.4",
2159
2167
  "@glideapps/glide-data-grid": "6.0.4-alpha24",
2160
- "@kortix/llm-catalog": "0.14.7",
2168
+ "@kortix/llm-catalog": "0.14.8",
2161
2169
  "@lezer/highlight": "1.2.3",
2162
2170
  "@paper-design/shaders-react": "^0.0.76",
2163
2171
  "@phosphor-icons/react": "2.1.10",
@@ -2246,7 +2254,7 @@
2246
2254
  "zustand": "^5.0.3"
2247
2255
  },
2248
2256
  "peerDependencies": {
2249
- "@kortix/sdk": "^0.14.7",
2257
+ "@kortix/sdk": "^0.14.8",
2250
2258
  "@tanstack/react-query": "^5.75.2",
2251
2259
  "@types/react": ">=18",
2252
2260
  "react": ">=19",
@@ -1,35 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- export declare const PROTOTYPE_ENABLED: boolean;
3
- export declare const NAV_VARIANTS: readonly [{
4
- readonly key: "rail";
5
- }, {
6
- readonly key: "tabs";
7
- }, {
8
- readonly key: "groups";
9
- }, {
10
- readonly key: "inline";
11
- }];
12
- export type NavVariant = (typeof NAV_VARIANTS)[number]['key'];
13
- export declare function useNavVariant(): NavVariant;
14
- export interface NavItem {
15
- key: string;
16
- label: string;
17
- group: string;
18
- }
19
- interface NavProps {
20
- groups: {
21
- group: string;
22
- items: NavItem[];
23
- }[];
24
- section: string;
25
- href: (key: string) => string;
26
- /** The current value per topic — "All", "2 picked", the model name. */
27
- summaries?: Partial<Record<string, string>>;
28
- }
29
- export declare function GroupedUnderlineTabs({ groups, section, href }: NavProps): import("react").JSX.Element;
30
- export declare function GroupSwitchTabs({ groups, section, href }: NavProps): import("react").JSX.Element;
31
- export declare function InlineVerticalTabs({ groups, section, href, summaries, children, }: NavProps & {
32
- children: ReactNode;
33
- }): import("react").JSX.Element;
34
- export declare function PrototypeSwitcher(): import("react").JSX.Element | null;
35
- export {};
@@ -1,95 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * PROTOTYPE — throwaway. Answers one question: what replaces the agent page's
5
- * left rail? Rendered on the real agent page, switched with `?variant=`:
6
- *
7
- * rail — today's left rail (the baseline; no param)
8
- * tabs — grouped underline tabs under the header, no rail
9
- * groups — General / Access / Runtime switch + that group's tabs
10
- * inline — vertical tabs beside the content column, each with its value
11
- *
12
- * Read-only navigation over the same `?section=` links; nothing here mutates.
13
- * Once a variant wins, fold it into `agent-page.tsx` properly and delete this
14
- * file and the switcher. Dev builds only (`PROTOTYPE_ENABLED`).
15
- */
16
- import { CaretLeftIcon, CaretRightIcon } from '@phosphor-icons/react';
17
- import { useCallback, useEffect } from 'react';
18
- import { useTranslations } from '../../i18n/index.js';
19
- import { cn } from '../../internal/lib/utils.js';
20
- import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
21
- import { UiLink as Link, useUiPathname as usePathname, useUiRouter as useRouter, useUiSearchParams as useSearchParams, } from '../../providers/ui-provider.js';
22
- export const PROTOTYPE_ENABLED = process.env.NODE_ENV !== 'production';
23
- export const NAV_VARIANTS = [{ key: 'rail' }, { key: 'tabs' }, { key: 'groups' }, { key: 'inline' }];
24
- export function useNavVariant() {
25
- const raw = useSearchParams().get('variant');
26
- if (!PROTOTYPE_ENABLED)
27
- return 'rail';
28
- return NAV_VARIANTS.some((v) => v.key === raw) ? raw : 'rail';
29
- }
30
- /** `?section=` link that keeps `?variant=` so switching topics stays in the variant. */
31
- function useVariantHref(href) {
32
- const variant = useSearchParams().get('variant');
33
- return (key) => (variant ? `${href(key)}&variant=${variant}` : href(key));
34
- }
35
- // ─── tabs: grouped underline tabs ──────────────────────────────────────────
36
- export function GroupedUnderlineTabs({ groups, section, href }) {
37
- const to = useVariantHref(href);
38
- return (_jsx("nav", { className: "border-border/60 flex shrink-0 items-end gap-8 overflow-x-auto border-b px-5 pt-1", children: groups.map((g) => (_jsxs("div", { className: "flex shrink-0 flex-col gap-1", children: [_jsx("span", { className: "text-muted-foreground px-2 text-xs", children: g.group }), _jsx(Tabs, { value: section, children: _jsx(TabsList, { type: "underline", className: "h-auto gap-1 border-b-0", children: g.items.map((item) => (_jsx(TabsTrigger, { value: item.key, asChild: true, className: "w-fit flex-none px-2", children: _jsx(Link, { href: to(item.key), prefetch: true, children: item.label }) }, item.key))) }) })] }, g.group))) }));
39
- }
40
- // ─── groups: group switch + sub tabs ───────────────────────────────────────
41
- export function GroupSwitchTabs({ groups, section, href }) {
42
- const to = useVariantHref(href);
43
- const active = groups.find((g) => g.items.some((i) => i.key === section)) ?? groups[0];
44
- return (_jsxs("nav", { className: "border-border/60 flex shrink-0 items-center gap-5 overflow-x-auto border-b px-5 py-2", children: [_jsx(Tabs, { value: active?.group, children: _jsx(TabsList, { children: groups.map((g) => (_jsx(TabsTrigger, { value: g.group, asChild: true, className: "w-fit flex-none", children: _jsx(Link, { href: to(g.items[0].key), prefetch: true, children: g.group }) }, g.group))) }) }), _jsx(Tabs, { value: section, children: _jsx(TabsList, { type: "underline", className: "h-auto gap-1 border-b-0", children: active?.items.map((item) => (_jsx(TabsTrigger, { value: item.key, asChild: true, className: "w-fit flex-none px-2", children: _jsx(Link, { href: to(item.key), prefetch: true, children: item.label }) }, item.key))) }) })] }));
45
- }
46
- // ─── inline: vertical tabs beside the content, with values ────────────────
47
- export function InlineVerticalTabs({ groups, section, href, summaries, children, }) {
48
- const to = useVariantHref(href);
49
- return (_jsxs("div", { className: "mx-auto flex w-full max-w-5xl items-start gap-14 px-4 py-10 pb-32 lg:py-14", children: [_jsx("nav", { className: "sticky top-0 flex w-52 shrink-0 flex-col gap-4", children: groups.map((g) => (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground px-2.5 pb-1 text-xs", children: g.group }), g.items.map((item) => {
50
- const isActive = item.key === section;
51
- return (_jsxs(Link, { href: to(item.key), prefetch: true, "aria-current": isActive ? 'page' : undefined, className: cn('flex items-center justify-between gap-3 rounded-md px-2.5 py-1.5 text-sm transition-none', isActive
52
- ? 'bg-active text-foreground font-medium'
53
- : 'text-muted-foreground hover:bg-hover hover:text-foreground'), children: [_jsx("span", { className: "truncate", children: item.label }), summaries?.[item.key] ? (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs font-normal tabular-nums", children: summaries[item.key] })) : null] }, item.key));
54
- })] }, g.group))) }), _jsx("div", { className: "min-w-0 max-w-2xl flex-1", children: children })] }));
55
- }
56
- // ─── the floating switcher ────────────────────────────────────────────────
57
- export function PrototypeSwitcher() {
58
- const router = useRouter();
59
- const pathname = usePathname();
60
- const search = useSearchParams();
61
- const current = useNavVariant();
62
- const t = useTranslations('agentNavPrototype');
63
- const labels = {
64
- rail: t('variantRail'),
65
- tabs: t('variantTabs'),
66
- groups: t('variantGroups'),
67
- inline: t('variantInline'),
68
- };
69
- const index = NAV_VARIANTS.findIndex((v) => v.key === current);
70
- const go = useCallback((step) => {
71
- const next = NAV_VARIANTS[(index + step + NAV_VARIANTS.length) % NAV_VARIANTS.length];
72
- const params = new URLSearchParams(search.toString());
73
- if (next.key === 'rail')
74
- params.delete('variant');
75
- else
76
- params.set('variant', next.key);
77
- router.replace(`${pathname}?${params.toString()}`, { scroll: false });
78
- }, [index, pathname, router, search]);
79
- useEffect(() => {
80
- const onKey = (event) => {
81
- const target = event.target;
82
- if (target?.closest('input, textarea, select, [contenteditable="true"]'))
83
- return;
84
- if (event.key === 'ArrowLeft')
85
- go(-1);
86
- if (event.key === 'ArrowRight')
87
- go(1);
88
- };
89
- window.addEventListener('keydown', onKey);
90
- return () => window.removeEventListener('keydown', onKey);
91
- }, [go]);
92
- if (!PROTOTYPE_ENABLED)
93
- return null;
94
- return (_jsx("div", { className: "pointer-events-none fixed inset-x-0 bottom-20 z-50 flex justify-center", children: _jsxs("div", { className: "bg-foreground text-background pointer-events-auto flex items-center gap-1 rounded-full p-1 shadow-lg", children: [_jsx("button", { type: "button", "aria-label": t('previousVariant'), onClick: () => go(-1), className: "flex size-7 items-center justify-center rounded-full hover:bg-background/15", children: _jsx(CaretLeftIcon, { className: "size-3.5" }) }), _jsxs("span", { className: "min-w-56 px-2 text-center text-xs tabular-nums", children: [String.fromCharCode(65 + index), " \u00B7 ", labels[NAV_VARIANTS[index].key]] }), _jsx("button", { type: "button", "aria-label": t('nextVariant'), onClick: () => go(1), className: "flex size-7 items-center justify-center rounded-full hover:bg-background/15", children: _jsx(CaretRightIcon, { className: "size-3.5" }) })] }) }));
95
- }