@neuronection/assistant-ui 0.53.0 → 0.54.0
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/CHANGELOG.md +25 -0
- package/README.md +1 -0
- package/dist/chat-markdown.js +1 -1
- package/dist/chat-message.js +1 -1
- package/dist/chat-transcript.js +1 -1
- package/dist/{chunk-NOAKHVBJ.js → chunk-56QSIK4Y.js} +3 -3
- package/dist/{chunk-NOAKHVBJ.js.map → chunk-56QSIK4Y.js.map} +1 -1
- package/dist/chunk-65JY3ATO.js +94 -0
- package/dist/chunk-65JY3ATO.js.map +1 -0
- package/dist/chunk-6G7H6YP6.js +180 -0
- package/dist/chunk-6G7H6YP6.js.map +1 -0
- package/dist/chunk-7IP3JP3Z.js +54 -0
- package/dist/chunk-7IP3JP3Z.js.map +1 -0
- package/dist/{chunk-HXU6P5FD.js → chunk-E2NNTHFB.js} +4 -4
- package/dist/{chunk-HXU6P5FD.js.map → chunk-E2NNTHFB.js.map} +1 -1
- package/dist/chunk-FQXVZVA5.js +68 -0
- package/dist/chunk-FQXVZVA5.js.map +1 -0
- package/dist/chunk-FY3NCPFO.js +112 -0
- package/dist/chunk-FY3NCPFO.js.map +1 -0
- package/dist/chunk-KKZLR3YD.js +3 -0
- package/dist/chunk-KKZLR3YD.js.map +1 -0
- package/dist/{chunk-KQLKITZL.js → chunk-KLCULTOQ.js} +3 -3
- package/dist/chunk-KLCULTOQ.js.map +1 -0
- package/dist/chunk-RRT3DOPJ.js +3 -0
- package/dist/chunk-RRT3DOPJ.js.map +1 -0
- package/dist/{chunk-I4R5BRC7.js → chunk-TLFEVL42.js} +3 -3
- package/dist/{chunk-I4R5BRC7.js.map → chunk-TLFEVL42.js.map} +1 -1
- package/dist/chunk-YDQW2WJH.js +70 -0
- package/dist/chunk-YDQW2WJH.js.map +1 -0
- package/dist/index.d.ts +206 -1
- package/dist/index.js +18 -12
- package/dist/markdown-diff-view.js +1 -1
- package/dist/provider-logo.d.ts +16 -0
- package/dist/provider-logo.js +3 -0
- package/dist/provider-logo.js.map +1 -0
- package/dist/provider-setup-form.d.ts +74 -0
- package/dist/provider-setup-form.js +3 -0
- package/dist/provider-setup-form.js.map +1 -0
- package/dist/provider-setup-tiles.d.ts +41 -0
- package/dist/provider-setup-tiles.js +3 -0
- package/dist/provider-setup-tiles.js.map +1 -0
- package/dist/setup-first-run-card.d.ts +23 -0
- package/dist/setup-first-run-card.js +3 -0
- package/dist/setup-first-run-card.js.map +1 -0
- package/dist/setup-review.d.ts +51 -0
- package/dist/setup-review.js +3 -0
- package/dist/setup-review.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/switch-row.d.ts +19 -0
- package/dist/switch-row.js +3 -0
- package/dist/switch-row.js.map +1 -0
- package/package.json +25 -1
- package/dist/chunk-KQLKITZL.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ProviderLogoProps extends React.ComponentProps<'span'> {
|
|
4
|
+
/** Preset key (`'openai'`, `'gemini'`, …) — unknown/unshipped marks fall
|
|
5
|
+
* back to a monogram of the key's first letter. */
|
|
6
|
+
preset: string;
|
|
7
|
+
/** Square icon size in px. */
|
|
8
|
+
size?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Provider mark for setup tiles and rows: simple-icons path data keyed by
|
|
11
|
+
* preset key, monogram fallback (openai/groq marks are gone upstream),
|
|
12
|
+
* `currentColor` so it inherits app identity. Decorative by default
|
|
13
|
+
* (`aria-hidden`) — name the tile/button it lives in. */
|
|
14
|
+
declare const ProviderLogo: React.ForwardRefExoticComponent<Omit<ProviderLogoProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
|
|
16
|
+
export { ProviderLogo, type ProviderLogoProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-logo.js"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** The shared §15 error-routing enum (family contract — apps key their i18n
|
|
4
|
+
* off exactly these codes). */
|
|
5
|
+
declare const SETUP_ERROR_CODES: readonly ["invalid_key", "insufficient_credit", "new_user_quota", "region_unavailable", "timeout", "local_not_running", "unknown"];
|
|
6
|
+
type SetupErrorCode = (typeof SETUP_ERROR_CODES)[number];
|
|
7
|
+
/** English fallback copy per code — apps inject translated labels via
|
|
8
|
+
* `errorLabels` (the library ships no i18n engine, ADR-006). */
|
|
9
|
+
declare const DEFAULT_SETUP_ERROR_COPY: Record<SetupErrorCode, string>;
|
|
10
|
+
/** Guided-setup preset slice (app data; snake_case API fields map app-side). */
|
|
11
|
+
interface ProviderSetupFormPreset {
|
|
12
|
+
name: string;
|
|
13
|
+
keyUrl?: string;
|
|
14
|
+
steps?: string[];
|
|
15
|
+
freeTierNote?: string;
|
|
16
|
+
fixedBase?: boolean;
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
/** Keyless local preset — renders `noKeyLabel` instead of the key field. */
|
|
19
|
+
local?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface ProviderSetupFormValue {
|
|
22
|
+
name: string;
|
|
23
|
+
apiKey: string;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Classified setup failure (§15 error routing) — copy comes from
|
|
27
|
+
* `errorLabels`, keyed off the code. */
|
|
28
|
+
interface ProviderSetupFormError {
|
|
29
|
+
code: SetupErrorCode | string;
|
|
30
|
+
suspectedVendor?: string | null;
|
|
31
|
+
}
|
|
32
|
+
interface ProviderSetupFormProps extends Omit<React.ComponentProps<'form'>, 'onChange' | 'onSubmit'> {
|
|
33
|
+
preset: ProviderSetupFormPreset;
|
|
34
|
+
/** Controlled field values. */
|
|
35
|
+
value: ProviderSetupFormValue;
|
|
36
|
+
error?: ProviderSetupFormError | null;
|
|
37
|
+
/** Validation/connection test in flight — disables + marks the submit. */
|
|
38
|
+
testing?: boolean;
|
|
39
|
+
onSubmit: (value: ProviderSetupFormValue) => void;
|
|
40
|
+
onCancel?: () => void;
|
|
41
|
+
onChange: (value: ProviderSetupFormValue) => void;
|
|
42
|
+
/** Translated error copy per §15 code (`{vendor}` interpolates in the hint). */
|
|
43
|
+
errorLabels?: Partial<Record<string, string>>;
|
|
44
|
+
suspectedVendorHint?: string;
|
|
45
|
+
/** Notified when a checklist step is copied (Electron apps mirror the copy
|
|
46
|
+
* through their IPC clipboard; the browser write always happens). */
|
|
47
|
+
onCopyStep?: (step: string) => void;
|
|
48
|
+
/** Opens the key page — render an anchor by default; Electron apps pass
|
|
49
|
+
* their `openExternal` bridge to get a button instead. */
|
|
50
|
+
onOpenKeyUrl?: (url: string) => void;
|
|
51
|
+
/** Extra app content inside the Advanced disclosure (hosting toggle,
|
|
52
|
+
* country select — study/health pattern). */
|
|
53
|
+
advancedExtra?: React.ReactNode;
|
|
54
|
+
checklistLabel?: string;
|
|
55
|
+
copyLabel?: string;
|
|
56
|
+
getKeyLabel?: string;
|
|
57
|
+
nameLabel?: string;
|
|
58
|
+
apiKeyLabel?: string;
|
|
59
|
+
keyPlaceholder?: string;
|
|
60
|
+
noKeyLabel?: string;
|
|
61
|
+
advancedLabel?: string;
|
|
62
|
+
baseUrlLabel?: string;
|
|
63
|
+
baseUrlHint?: string;
|
|
64
|
+
submitLabel?: string;
|
|
65
|
+
cancelLabel?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Guided one-click setup form (plan 26 §6): vendor checklist with copy
|
|
68
|
+
* buttons and key link, connection name, write-only API key
|
|
69
|
+
* (`autoComplete="new-password"`), and an Advanced disclosure whose base URL
|
|
70
|
+
* is read-only for fixed-endpoint presets. Validation, secrets and IPC are
|
|
71
|
+
* the app's business (ADR-006) — the form reports `onSubmit`. */
|
|
72
|
+
declare const ProviderSetupForm: React.ForwardRefExoticComponent<Omit<ProviderSetupFormProps, "ref"> & React.RefAttributes<HTMLFormElement>>;
|
|
73
|
+
|
|
74
|
+
export { DEFAULT_SETUP_ERROR_COPY, ProviderSetupForm, type ProviderSetupFormError, type ProviderSetupFormPreset, type ProviderSetupFormProps, type ProviderSetupFormValue, SETUP_ERROR_CODES, type SetupErrorCode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-setup-form.js"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** One preset entry (ADR-006: the catalog is app data — the tiles only
|
|
4
|
+
* render it, in the order given, with equal weight). */
|
|
5
|
+
interface ProviderSetupTileData {
|
|
6
|
+
key: string;
|
|
7
|
+
name: string;
|
|
8
|
+
/** Keyless local preset (e.g. Ollama) — renders the `localLabel` caption. */
|
|
9
|
+
local?: boolean;
|
|
10
|
+
/** Disabled tiles render inert with their reason (health's overlay). */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disabledReason?: string;
|
|
13
|
+
/** The preset ships a key-prefix hint (informational for the app). */
|
|
14
|
+
hasKeyPrefixHint?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface ProviderSetupTilesProps extends Omit<React.ComponentProps<'div'>, 'onSelect' | 'children'> {
|
|
17
|
+
/** Presets in the app's family order — the grid keeps it verbatim. */
|
|
18
|
+
presets: ProviderSetupTileData[];
|
|
19
|
+
/** Preset keys already configured (renders the `configuredLabel` badge). */
|
|
20
|
+
configured?: string[];
|
|
21
|
+
/** Key of a tile the app's paste-prefix match suggests (highlight only —
|
|
22
|
+
* never a "recommended" ranking; all tiles stay equal weight). */
|
|
23
|
+
suggestedKey?: string;
|
|
24
|
+
/** Fires with the preset key of the activated tile. */
|
|
25
|
+
onSelect: (key: string) => void;
|
|
26
|
+
/** Extra grid cell (e.g. the "Manual / custom" tile) — app-composed. */
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
label?: string;
|
|
29
|
+
localLabel?: string;
|
|
30
|
+
configuredLabel?: string;
|
|
31
|
+
/** Visually-hidden text marking the suggested tile. */
|
|
32
|
+
suggestedLabel?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Neutral, equal-weight provider picker grid — step one of the family's
|
|
35
|
+
* one-click setup (plan 26 §6): tiles in family order, no "recommended"
|
|
36
|
+
* anywhere, local presets visible, disabled presets explain themselves. */
|
|
37
|
+
declare const ProviderSetupTiles: React.ForwardRefExoticComponent<Omit<ProviderSetupTilesProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
/** The "manual / custom" tile apps append as `children` of the grid. */
|
|
39
|
+
declare const ProviderSetupManualTile: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
40
|
+
|
|
41
|
+
export { ProviderSetupManualTile, type ProviderSetupTileData, ProviderSetupTiles, type ProviderSetupTilesProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-setup-tiles.js"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface SetupFirstRunCardProps extends Omit<React.ComponentProps<'section'>, 'title'> {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
body?: React.ReactNode;
|
|
6
|
+
/** The app is probing for a local engine (e.g. Ollama) — renders the
|
|
7
|
+
* `probingLabel` status line while it runs. */
|
|
8
|
+
localProbing?: boolean;
|
|
9
|
+
onSetup: () => void;
|
|
10
|
+
/** Optional dismiss — omit to render the card without a dismiss action. */
|
|
11
|
+
onDismiss?: () => void;
|
|
12
|
+
/** App content between body and actions (e.g. a detected-local banner). */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
setupLabel?: string;
|
|
15
|
+
dismissLabel?: string;
|
|
16
|
+
probingLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Empty-state CTA for the AI-settings surface when no provider is
|
|
19
|
+
* configured yet (plan 26 §6) — the entry point of the setup flow. Chat
|
|
20
|
+
* empty states deep-link to the settings surface that renders this card. */
|
|
21
|
+
declare const SetupFirstRunCard: React.ForwardRefExoticComponent<Omit<SetupFirstRunCardProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
22
|
+
|
|
23
|
+
export { SetupFirstRunCard, type SetupFirstRunCardProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"setup-first-run-card.js"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
/** One curated model card (capability icons render from `caps`). */
|
|
5
|
+
interface SetupReviewModel {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
caps?: string[];
|
|
9
|
+
selected: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** The five-bind option keys of the §15 options body (camelCase — desktop
|
|
12
|
+
* IPC; Python apps convert to snake_case app-side). */
|
|
13
|
+
type SetupReviewOptionsKey = 'bindChat' | 'bindVision' | 'bindStt' | 'bindDecision';
|
|
14
|
+
/** One gap-fill switch. Pass one slot per `optionsKey` — chat presets show
|
|
15
|
+
* text/vision/stt slots, decision-only presets show the decision slot only;
|
|
16
|
+
* the current value of every slot the bind would fill rides `currentValue`. */
|
|
17
|
+
interface SetupReviewSlot {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
bind: boolean;
|
|
21
|
+
currentValue?: string;
|
|
22
|
+
optionsKey: SetupReviewOptionsKey;
|
|
23
|
+
}
|
|
24
|
+
/** The options body a setup run carries (plan 26 D14) — `curatedIds` in the
|
|
25
|
+
* order the cards are given, one bind flag per capability group. */
|
|
26
|
+
interface SetupReviewOptions {
|
|
27
|
+
curatedIds: string[];
|
|
28
|
+
bindChat: boolean;
|
|
29
|
+
bindVision: boolean;
|
|
30
|
+
bindStt: boolean;
|
|
31
|
+
bindDecision: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface SetupReviewProps extends React.ComponentProps<'div'> {
|
|
34
|
+
models: SetupReviewModel[];
|
|
35
|
+
slots: SetupReviewSlot[];
|
|
36
|
+
/** Emits the full options body on every card/switch edit — controlled:
|
|
37
|
+
* feed the changed state back through `models`/`slots`. */
|
|
38
|
+
onOptionsChange: (options: SetupReviewOptions) => void;
|
|
39
|
+
/** Per-capability icon override (capability string → icon). */
|
|
40
|
+
capIcons?: Partial<Record<string, LucideIcon>>;
|
|
41
|
+
modelsLabel?: string;
|
|
42
|
+
footnote?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Editable pre-flight review (plan 26 §6): model-select cards with
|
|
45
|
+
* capability icons plus gap-fill switch rows with `now:` sub-lines and the
|
|
46
|
+
* never-removes footnote. Emits the five-bind options body
|
|
47
|
+
* `{curatedIds, bindChat, bindVision, bindStt, bindDecision}` — append
|
|
48
|
+
* semantics mean nothing existing is ever removed. */
|
|
49
|
+
declare const SetupReview: React.ForwardRefExoticComponent<Omit<SetupReviewProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
|
|
51
|
+
export { SetupReview, type SetupReviewModel, type SetupReviewOptions, type SetupReviewOptionsKey, type SetupReviewProps, type SetupReviewSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"setup-review.js"}
|