@aleph-alpha/chat-kit 1.17.2 → 1.18.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/dist/{CkInput.vue_vue_type_script_setup_true_lang-DxUWj4Vh.js → CkInput.vue_vue_type_script_setup_true_lang-BGlztr2p.js} +212 -99
- package/dist/chat-kit.css +5 -5
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.d.ts +6 -0
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.d.ts.map +1 -1
- package/dist/components/base/CkFeedbackDialog/CkFeedbackDialog.vue.d.ts.map +1 -1
- package/dist/components/base/CkModelSelector/CkModelSelector.stories.d.ts +20 -0
- package/dist/components/base/CkModelSelector/CkModelSelector.stories.d.ts.map +1 -0
- package/dist/components/base/CkModelSelector/CkModelSelector.vue.d.ts +16 -0
- package/dist/components/base/CkModelSelector/CkModelSelector.vue.d.ts.map +1 -0
- package/dist/components/base/CkModelSelector/index.d.ts +3 -0
- package/dist/components/base/CkModelSelector/index.d.ts.map +1 -0
- package/dist/components/base/CkModelSelector/types.d.ts +54 -0
- package/dist/components/base/CkModelSelector/types.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +2 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +9 -8
- package/dist/handlers/index.js +1 -1
- package/dist/handlers/useChatKitLabels.d.ts +6 -0
- package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -10
- package/dist/{useChatKitLabels-BC6ItJc6.js → useChatKitLabels-ZutacPad.js} +3 -0
- package/package.json +2 -2
- package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts +35 -0
- package/src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue +2 -2
- package/src/components/base/CkModelSelector/CkModelSelector.spec.ts +60 -0
- package/src/components/base/CkModelSelector/CkModelSelector.stories.ts +101 -0
- package/src/components/base/CkModelSelector/CkModelSelector.vue +109 -0
- package/src/components/base/CkModelSelector/index.ts +6 -0
- package/src/components/base/CkModelSelector/types.ts +55 -0
- package/src/components/base/index.ts +6 -0
- package/src/components/index.ts +4 -0
- package/src/handlers/useChatKitLabels.spec.ts +5 -28
- package/src/handlers/useChatKitLabels.ts +9 -0
- package/src/index.ts +4 -0
package/dist/chat-kit.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.ck-feedback-dialog__chip[data-v-
|
|
26
|
+
.ck-feedback-dialog__chip[data-v-181a7aa9] {
|
|
27
27
|
width: 100%;
|
|
28
28
|
min-height: 36px;
|
|
29
29
|
height: auto;
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
text-align: center;
|
|
32
32
|
line-height: 1rem;
|
|
33
33
|
}
|
|
34
|
-
.ck-feedback-dialog__response[data-v-
|
|
35
|
-
.ck-feedback-dialog__response[data-v-
|
|
34
|
+
.ck-feedback-dialog__response[data-v-181a7aa9] p,
|
|
35
|
+
.ck-feedback-dialog__response[data-v-181a7aa9] li {
|
|
36
36
|
line-height: 1.5rem;
|
|
37
37
|
}
|
|
38
|
-
.ck-feedback-dialog__response[data-v-
|
|
38
|
+
.ck-feedback-dialog__response[data-v-181a7aa9] p {
|
|
39
39
|
margin: 0 0 0.5rem 0;
|
|
40
40
|
}
|
|
41
|
-
.ck-feedback-dialog__response[data-v-
|
|
41
|
+
.ck-feedback-dialog__response[data-v-181a7aa9] p:last-child {
|
|
42
42
|
margin-bottom: 0;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -22,6 +22,12 @@ export declare const NoResponseColumn: Story;
|
|
|
22
22
|
* are non-interactive.
|
|
23
23
|
*/
|
|
24
24
|
export declare const Submitting: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Long response that exceeds viewport height. The response column should scroll
|
|
27
|
+
* internally so the dialog stays within the viewport and the submit/cancel
|
|
28
|
+
* actions remain reachable.
|
|
29
|
+
*/
|
|
30
|
+
export declare const LongResponse: Story;
|
|
25
31
|
/**
|
|
26
32
|
* Realistic end-to-end flow wired to `CkFeedbackButton`. Click a thumb to open
|
|
27
33
|
* the dialog; submit or cancel; the button locks only on submit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkFeedbackDialog.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAOtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"CkFeedbackDialog.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAOtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA2D3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAgBvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoEnC;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAqEhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkFeedbackDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue"],"names":[],"mappings":"AAwSA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CkFeedbackDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkFeedbackDialog/CkFeedbackDialog.vue"],"names":[],"mappings":"AAwSA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAygBjB,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import CkModelSelector from './CkModelSelector.vue';
|
|
3
|
+
declare const meta: Meta<typeof CkModelSelector>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CkModelSelector>;
|
|
6
|
+
/**
|
|
7
|
+
* Default picker with a current selection. Opens upward and aligns to the
|
|
8
|
+
* end, matching its intended spot next to a send button.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
/**
|
|
12
|
+
* No selection yet — the trigger shows the placeholder label until the user
|
|
13
|
+
* picks a model.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Placeholder: Story;
|
|
16
|
+
/**
|
|
17
|
+
* Disabled trigger — e.g. while the model list is still loading.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Disabled: Story;
|
|
20
|
+
//# sourceMappingURL=CkModelSelector.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkModelSelector.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkModelSelector/CkModelSelector.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,eAAe,MAAM,uBAAuB,CAAC;AASpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAyBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAoC9C;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAGtB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CkModelSelectorProps } from './types';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<CkModelSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
"update:selectedModelId": (id: string) => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<CkModelSelectorProps> & Readonly<{
|
|
5
|
+
"onUpdate:selectedModelId"?: ((id: string) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
side: "top" | "right" | "bottom" | "left";
|
|
9
|
+
sideOffset: number;
|
|
10
|
+
align: "start" | "center" | "end";
|
|
11
|
+
models: readonly import("./types").CkModelOption[];
|
|
12
|
+
selectedModelId: string | null;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=CkModelSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CkModelSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkModelSelector/CkModelSelector.vue"],"names":[],"mappings":"AA4HA,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA6Q1E,QAAA,MAAM,YAAY;;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkModelSelector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact dropdown for choosing the active model, sized to sit inline in a
|
|
3
|
+
* prompt field next to the send button. Controlled component: pass the
|
|
4
|
+
* available `models` and the `selectedModelId`, and react to
|
|
5
|
+
* `update:selectedModelId` (so it works with `v-model:selected-model-id`).
|
|
6
|
+
* Purely presentational — fetching the list and persisting the choice are the
|
|
7
|
+
* consumer's responsibility.
|
|
8
|
+
*
|
|
9
|
+
* @category Actions
|
|
10
|
+
* @useCases select model, choose LLM, model picker in prompt field, switch model mid-conversation
|
|
11
|
+
* @keywords model, selector, picker, dropdown, llm, prompt, choose, switch
|
|
12
|
+
* @related CkPromptInput, CkPromptActionButton
|
|
13
|
+
*/
|
|
14
|
+
export interface CkModelOption {
|
|
15
|
+
/**
|
|
16
|
+
* Stable identifier for the model. Emitted on selection and compared
|
|
17
|
+
* against `selectedModelId` to mark the active row.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/** Display name shown in the trigger and the option row. */
|
|
21
|
+
label: string;
|
|
22
|
+
}
|
|
23
|
+
export interface CkModelSelectorProps {
|
|
24
|
+
/** Models to choose from. The dropdown trigger is still rendered when empty. */
|
|
25
|
+
models?: readonly CkModelOption[];
|
|
26
|
+
/** Id of the currently selected model. */
|
|
27
|
+
selectedModelId?: string | null;
|
|
28
|
+
/** Disable the trigger (e.g. while a model list is loading). */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Which side of the trigger the dropdown opens on.
|
|
32
|
+
* @default 'top'
|
|
33
|
+
*/
|
|
34
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
35
|
+
/**
|
|
36
|
+
* Alignment of the dropdown relative to the trigger.
|
|
37
|
+
* @default 'end'
|
|
38
|
+
*/
|
|
39
|
+
align?: 'start' | 'center' | 'end';
|
|
40
|
+
/**
|
|
41
|
+
* Gap in pixels between the trigger and the dropdown.
|
|
42
|
+
* @default 8
|
|
43
|
+
*/
|
|
44
|
+
sideOffset?: number;
|
|
45
|
+
}
|
|
46
|
+
/** Emitted events for `CkModelSelector`. */
|
|
47
|
+
export interface CkModelSelectorEmits {
|
|
48
|
+
/**
|
|
49
|
+
* Fired with the chosen model id when the selection changes. Pairs with
|
|
50
|
+
* `v-model:selected-model-id`.
|
|
51
|
+
*/
|
|
52
|
+
'update:selectedModelId': [id: string];
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkModelSelector/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IAClC,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,wBAAwB,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;CACxC"}
|
|
@@ -16,6 +16,8 @@ export type { CkHistoryWrapperProps } from './CkHistoryWrapper';
|
|
|
16
16
|
export { CkMarkdownRenderer } from './CkMarkdownRenderer';
|
|
17
17
|
export type { CkMarkdownRendererProps, CkMarkdownElementClasses, } from './CkMarkdownRenderer';
|
|
18
18
|
export { CkMessageActionButton } from './CkMessageActionButton';
|
|
19
|
+
export { CkModelSelector } from './CkModelSelector';
|
|
20
|
+
export type { CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, } from './CkModelSelector';
|
|
19
21
|
export { CkPromptActionButton } from './CkPromptActionButton';
|
|
20
22
|
export { CkPromptStopButton } from './CkPromptStopButton';
|
|
21
23
|
export { CkPromptInput } from './CkPromptInput';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,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,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
|
|
2
|
-
export type { CkConversationLayoutProps, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './base';
|
|
1
|
+
export { CkAgentMessage, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageActionButton, CkModelSelector, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './base';
|
|
2
|
+
export type { CkConversationLayoutProps, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkUserMessageProps, } from './base';
|
|
3
3
|
export { CkConversation, CkHistory, CkInput } from './composed';
|
|
4
4
|
export type { CkConversationProps, CkHistoryEmits, CkHistoryProps, } from './composed';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r } from "../CkInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s } from "../CkInput.vue_vue_type_script_setup_true_lang-BGlztr2p.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CkAgentMessage,
|
|
4
4
|
a as CkConversation,
|
|
@@ -13,11 +13,12 @@ export {
|
|
|
13
13
|
i as CkInput,
|
|
14
14
|
j as CkMarkdownRenderer,
|
|
15
15
|
k as CkMessageActionButton,
|
|
16
|
-
l as
|
|
17
|
-
m as
|
|
18
|
-
n as
|
|
19
|
-
o as
|
|
20
|
-
p as
|
|
21
|
-
q as
|
|
22
|
-
r as
|
|
16
|
+
l as CkModelSelector,
|
|
17
|
+
m as CkPromptActionButton,
|
|
18
|
+
n as CkPromptInput,
|
|
19
|
+
o as CkPromptInputDisclaimer,
|
|
20
|
+
p as CkPromptStopButton,
|
|
21
|
+
q as CkSendIcon,
|
|
22
|
+
r as CkStopIcon,
|
|
23
|
+
s as CkUserMessage
|
|
23
24
|
};
|
package/dist/handlers/index.js
CHANGED
|
@@ -67,6 +67,12 @@ export type ChatKitLabels = {
|
|
|
67
67
|
userMessageShowMore?: string;
|
|
68
68
|
/** Label for the `CkUserMessage` toggle when the message is expanded. */
|
|
69
69
|
userMessageShowLess?: string;
|
|
70
|
+
/** Accessible label for the `CkModelSelector` trigger button. */
|
|
71
|
+
modelSelectorAriaLabel?: string;
|
|
72
|
+
/** Accessible label for the `CkModelSelector` options list. */
|
|
73
|
+
modelSelectorListAriaLabel?: string;
|
|
74
|
+
/** Trigger text shown by `CkModelSelector` when no model is selected. */
|
|
75
|
+
modelSelectorPlaceholder?: string;
|
|
70
76
|
/** Fallback title used by `CkHistory` when a conversation has no `title`. */
|
|
71
77
|
historyItemUntitled: string;
|
|
72
78
|
/** Accessible name for the trailing kebab trigger on each `CkHistory` row. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatKitLabels.d.ts","sourceRoot":"","sources":["../../src/handlers/useChatKitLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gDAAgD;IAChD,gBAAgB,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4FAA4F;IAC5F,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,+DAA+D;IAC/D,2BAA2B,CAAC,EA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AM,oBAAoB,EAAE,aA8BlC,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAAC,aAAa,CAAC,CAC1C,CAAC;AAE5B,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5C,yFAAyF;AACzF,KAAK,cAAc,GACf,GAAG,CAAC,aAAa,CAAC,GAClB,WAAW,CAAC,aAAa,CAAC,GAC1B,CAAC,MAAM,aAAa,CAAC,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAKjE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAAC,aAAa,CAAC,CAK7D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { useChat, useConversationSessions, useConversations, } from './composabl
|
|
|
5
5
|
export type { ChatActions, ChatState, ConversationSession, CreateConversationInput, MessageHandler, MutationOptions, UseChatReturn, UseConversationSessionsReturn, UseConversationsOptions, UseConversationsReturn, } from './composables';
|
|
6
6
|
export { SdkError, createDocumentUploadProvider, defaultDocumentUploadConfig, defaultEndpoints, useDocumentUploadWithDefaultConfig, } from './composables/fileUpload';
|
|
7
7
|
export type { DocumentUploadConfig, DocumentUploadProvider, FileEntry, FileStatus, } from './composables/fileUpload';
|
|
8
|
-
export { CkAgentMessage, CkConversation, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkInput, CkMarkdownRenderer, CkMessageActionButton, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './components';
|
|
9
|
-
export type { CkConversationLayoutProps, CkConversationProps, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkUserMessageProps, } from './components';
|
|
8
|
+
export { CkAgentMessage, CkConversation, CkConversationLayout, CkCopyMessageActionButton, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkInput, CkMarkdownRenderer, CkMessageActionButton, CkModelSelector, CkPromptActionButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkSendIcon, CkStopIcon, CkUserMessage, } from './components';
|
|
9
|
+
export type { CkConversationLayoutProps, CkConversationProps, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkUserMessageProps, } from './components';
|
|
10
10
|
export { formatRelativeTime } from './helpers';
|
|
11
11
|
export type { BaseMessage, Conversation, ConversationTree, MessageContent, MessageContentStatus, MessageMetadata, MessageReasoningContent, MessageRole, MessageStatus, MessageTextContent, MessageToolContent, TreeMessage, } from './types';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW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tB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/C,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AASpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,OAAO,EACP,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,EACT,UAAU,GACX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/C,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u } from "./useMessageHandler-CMdy-lm0.js";
|
|
2
|
-
import { C, d, p, u as u2, a } from "./useChatKitLabels-
|
|
2
|
+
import { C, d, p, u as u2, a } from "./useChatKitLabels-ZutacPad.js";
|
|
3
3
|
import { S, c, d as d2, a as a2, u as u3, b, e, f } from "./index-Ct5hD214.js";
|
|
4
|
-
import { _, a as a3, b as b2, C as C2, c as c2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r, s } from "./CkInput.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _, a as a3, b as b2, C as C2, c as c2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r, s, t } from "./CkInput.vue_vue_type_script_setup_true_lang-BGlztr2p.js";
|
|
5
5
|
export {
|
|
6
6
|
C as CHAT_KIT_LABELS,
|
|
7
7
|
_ as CkAgentMessage,
|
|
@@ -17,19 +17,20 @@ export {
|
|
|
17
17
|
i as CkInput,
|
|
18
18
|
j as CkMarkdownRenderer,
|
|
19
19
|
k as CkMessageActionButton,
|
|
20
|
-
l as
|
|
21
|
-
m as
|
|
22
|
-
n as
|
|
23
|
-
o as
|
|
24
|
-
p2 as
|
|
25
|
-
q as
|
|
26
|
-
r as
|
|
20
|
+
l as CkModelSelector,
|
|
21
|
+
m as CkPromptActionButton,
|
|
22
|
+
n as CkPromptInput,
|
|
23
|
+
o as CkPromptInputDisclaimer,
|
|
24
|
+
p2 as CkPromptStopButton,
|
|
25
|
+
q as CkSendIcon,
|
|
26
|
+
r as CkStopIcon,
|
|
27
|
+
s as CkUserMessage,
|
|
27
28
|
S as SdkError,
|
|
28
29
|
c as createDocumentUploadProvider,
|
|
29
30
|
d as defaultChatKitLabels,
|
|
30
31
|
d2 as defaultDocumentUploadConfig,
|
|
31
32
|
a2 as defaultEndpoints,
|
|
32
|
-
|
|
33
|
+
t as formatRelativeTime,
|
|
33
34
|
p as provideChatKitLabels,
|
|
34
35
|
u3 as useChat,
|
|
35
36
|
u2 as useChatKitLabels,
|
|
@@ -12719,6 +12719,9 @@ const defaultChatKitLabels = {
|
|
|
12719
12719
|
feedbackDialogSubmitLabel: "Submit",
|
|
12720
12720
|
userMessageShowMore: "Show more",
|
|
12721
12721
|
userMessageShowLess: "Show less",
|
|
12722
|
+
modelSelectorAriaLabel: "Select model",
|
|
12723
|
+
modelSelectorListAriaLabel: "Models",
|
|
12724
|
+
modelSelectorPlaceholder: "Select model",
|
|
12722
12725
|
historyItemUntitled: "Untitled conversation",
|
|
12723
12726
|
historyItemActionAriaLabel: "Conversation options",
|
|
12724
12727
|
historyItemEditAction: "Edit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/chat-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Chat kit package for building chat interfaces with Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vue": "^3.5.27"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@aleph-alpha/ui-library": "^2.8.
|
|
68
|
+
"@aleph-alpha/ui-library": "^2.8.3",
|
|
69
69
|
"dompurify": "^3.3.2",
|
|
70
70
|
"rehype-stringify": "^10.0.1",
|
|
71
71
|
"remark-gfm": "^4.0.1",
|
|
@@ -43,6 +43,27 @@ Key Lessons Learned:
|
|
|
43
43
|
- **Stakeholder Involvement:** The most critical lesson was the need for early and **continuous stakeholder involvement** from all affected departments. A lack of initial engagement led to significant user resistance and process rework in the initial rollout.
|
|
44
44
|
- **User Training:** Tailored, hands-on training was found to be far more effective than generic sessions. Departments that received customized training saw a **25% higher adoption rate** of the new tools compared to those with generic training.`;
|
|
45
45
|
|
|
46
|
+
const LONG_RESPONSE = `Below is the complete corporate travel and expense policy. Several sections expand the original guidelines based on feedback from the 2026 internal audit.
|
|
47
|
+
|
|
48
|
+
1. **General Travel Principles** – travel must serve clear business objectives, be cost-conscious, sustainable, and respect time and well-being. Short trips (e.g., Berlin → Heidelberg) are discouraged unless essential.
|
|
49
|
+
2. **Booking Travels** – all trips must be booked via the mandatory Lanes & Planes platform. Reasons are classified (company events, team workshops, partner meetings, trade fairs, office visits, onboarding, onsite interviews, etc.). No pre-approval is needed if the booking follows policy.
|
|
50
|
+
3. **Travel Guidelines (Mobility)**
|
|
51
|
+
- **Train travel** – preferred mode; book early, aim for 2nd-class Supersparpreis tickets ≤ €100, reserve seats, use a BahnCard where appropriate.
|
|
52
|
+
- **Car travel** – allowed only when logistically or economically justified; own-vehicle mileage reimbursed at €0.30/km. Inter-office car trips require explicit manager approval.
|
|
53
|
+
- **Taxi & Ride Services** – exceptional cases only (e.g., strikes, urgent client arrival).
|
|
54
|
+
- **Air Travel** – used when train travel is infeasible or >100% longer; economy class is default; premium options need manager approval.
|
|
55
|
+
4. **Accommodation** – book mid-range hotels (€80–100/night, up to €120/night in major cities). Free cancellation preferred. Hotel stays in the contract location are not permitted except for approved team events.
|
|
56
|
+
5. **International Business Travel** – all international bookings must be made in Lanes & Planes, triggering an automatic WorkFlex compliance check. Travelers must complete a WorkFlex profile, book at least 3 working days in advance, and carry an A1 certificate.
|
|
57
|
+
6. **Costs Outside Lanes & Planes** – per-diems are only reimbursed for external client/partner trips (€14 for 8–24 h, €28 for longer trips). Other expenses need a pre-approved cost-acceptance form and itemised receipts.
|
|
58
|
+
7. **Receipts & Reimbursement** – all receipts must be submitted via the Receipts portal within 14 days of return. Submissions older than 60 days are not reimbursed unless approved by Finance and the line manager.
|
|
59
|
+
8. **Sustainability** – combined train+overnight travel is preferred over short-haul flights wherever total travel time stays within 6 hours of the equivalent flight itinerary.
|
|
60
|
+
9. **Personal Time Combined with Business Travel** – allowed for up to 3 calendar days adjacent to the business portion. The personal segment must be clearly itemised so the company only covers business-related expenses.
|
|
61
|
+
10. **Per-Diem Edge Cases** – when meals are provided by a customer, the daily per-diem is reduced (breakfast: -20%, lunch: -40%, dinner: -40%). Travelers must self-declare this in the reimbursement form.
|
|
62
|
+
11. **Visa & Documentation** – travelers are responsible for keeping their passports valid for at least 6 months beyond the trip end date. The company covers business visa application fees but not expedited service unless explicitly approved.
|
|
63
|
+
12. **Travel Insurance** – the corporate travel insurance covers all business trips booked via Lanes & Planes by default. For trips outside that channel, contact the People Operations team at least 5 working days before departure.
|
|
64
|
+
|
|
65
|
+
Please review the full policy carefully before your next booking and reach out to People Operations with any questions.`;
|
|
66
|
+
|
|
46
67
|
const meta: Meta<typeof CkFeedbackDialog> = {
|
|
47
68
|
title: 'Base/CkFeedbackDialog',
|
|
48
69
|
component: CkFeedbackDialog,
|
|
@@ -182,6 +203,20 @@ export const Submitting: Story = {
|
|
|
182
203
|
},
|
|
183
204
|
};
|
|
184
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Long response that exceeds viewport height. The response column should scroll
|
|
208
|
+
* internally so the dialog stays within the viewport and the submit/cancel
|
|
209
|
+
* actions remain reachable.
|
|
210
|
+
*/
|
|
211
|
+
export const LongResponse: Story = {
|
|
212
|
+
args: {
|
|
213
|
+
open: true,
|
|
214
|
+
sentiment: 'negative',
|
|
215
|
+
reasons: NEGATIVE_REASONS,
|
|
216
|
+
responseText: LONG_RESPONSE,
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
|
|
185
220
|
/**
|
|
186
221
|
* Realistic end-to-end flow wired to `CkFeedbackButton`. Click a thumb to open
|
|
187
222
|
* the dialog; submit or cancel; the button locks only on submit.
|
|
@@ -177,7 +177,7 @@ function handleSubmit(): void {
|
|
|
177
177
|
<UiDialogContent
|
|
178
178
|
:title="title"
|
|
179
179
|
max-width="max-w-4xl"
|
|
180
|
-
class="ck-feedback-dialog"
|
|
180
|
+
class="ck-feedback-dialog h-[min(85vh,_40rem)]"
|
|
181
181
|
:show-close-button="!(submitting || disabled)"
|
|
182
182
|
>
|
|
183
183
|
<UiDialogDescription class="sr-only">
|
|
@@ -185,7 +185,7 @@ function handleSubmit(): void {
|
|
|
185
185
|
</UiDialogDescription>
|
|
186
186
|
<div
|
|
187
187
|
:class="[
|
|
188
|
-
'grid gap-12',
|
|
188
|
+
'grid min-h-0 flex-1 grid-rows-1 gap-12',
|
|
189
189
|
showResponseColumn ? 'grid-cols-2' : 'grid-cols-1',
|
|
190
190
|
]"
|
|
191
191
|
>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defaultChatKitLabels } from '../../../handlers/useChatKitLabels';
|
|
2
|
+
import CkModelSelector from './CkModelSelector.vue';
|
|
3
|
+
import type { CkModelOption } from './types';
|
|
4
|
+
import userEvent from '@testing-library/user-event';
|
|
5
|
+
import { render, screen } from '@testing-library/vue';
|
|
6
|
+
import { describe, expect, it } from 'vitest';
|
|
7
|
+
|
|
8
|
+
const PLACEHOLDER = defaultChatKitLabels.modelSelectorPlaceholder!;
|
|
9
|
+
const TRIGGER_LABEL = defaultChatKitLabels.modelSelectorAriaLabel!;
|
|
10
|
+
|
|
11
|
+
const MODELS: CkModelOption[] = [
|
|
12
|
+
{ id: 'kimi', label: 'Kimi' },
|
|
13
|
+
{ id: 'phoenix', label: 'Phoenix' },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
describe('CkModelSelector', () => {
|
|
17
|
+
it('shows the selected model label on the trigger', () => {
|
|
18
|
+
render(CkModelSelector, {
|
|
19
|
+
props: { models: MODELS, selectedModelId: 'phoenix' },
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
expect(
|
|
23
|
+
screen.getByRole('button', { name: TRIGGER_LABEL }),
|
|
24
|
+
).toHaveTextContent('Phoenix');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('falls back to the placeholder when nothing is selected', () => {
|
|
28
|
+
render(CkModelSelector, {
|
|
29
|
+
props: { models: MODELS, selectedModelId: null },
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
expect(
|
|
33
|
+
screen.getByRole('button', { name: TRIGGER_LABEL }),
|
|
34
|
+
).toHaveTextContent(PLACEHOLDER);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('emits update:selectedModelId with the chosen id', async () => {
|
|
38
|
+
const user = userEvent.setup();
|
|
39
|
+
const { emitted } = render(CkModelSelector, {
|
|
40
|
+
props: { models: MODELS, selectedModelId: 'phoenix' },
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
await user.click(screen.getByRole('button', { name: TRIGGER_LABEL }));
|
|
44
|
+
await user.click(await screen.findByRole('option', { name: 'Kimi' }));
|
|
45
|
+
|
|
46
|
+
expect(emitted('update:selectedModelId')).toEqual([['kimi']]);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('does not re-emit when the already-selected model is clicked', async () => {
|
|
50
|
+
const user = userEvent.setup();
|
|
51
|
+
const { emitted } = render(CkModelSelector, {
|
|
52
|
+
props: { models: MODELS, selectedModelId: 'phoenix' },
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
await user.click(screen.getByRole('button', { name: TRIGGER_LABEL }));
|
|
56
|
+
await user.click(await screen.findByRole('option', { name: 'Phoenix' }));
|
|
57
|
+
|
|
58
|
+
expect(emitted('update:selectedModelId')).toBeUndefined();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import CkModelSelector from './CkModelSelector.vue';
|
|
4
|
+
import type { CkModelOption } from './types';
|
|
5
|
+
|
|
6
|
+
const MODELS: CkModelOption[] = [
|
|
7
|
+
{ id: 'kimi', label: 'Kimi' },
|
|
8
|
+
{ id: 'phoenix', label: 'Phoenix' },
|
|
9
|
+
{ id: 'phoenix-no-think', label: 'Phoenix (no thinking)' },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const meta: Meta<typeof CkModelSelector> = {
|
|
13
|
+
title: 'Base/CkModelSelector',
|
|
14
|
+
component: CkModelSelector,
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: 'centered',
|
|
18
|
+
docs: {
|
|
19
|
+
description: {
|
|
20
|
+
component:
|
|
21
|
+
'Compact, controlled model picker for a prompt field. Pass `models` and `selectedModelId`; react to **`update:selectedModelId`** (works with `v-model:selected-model-id`). Presentational only — the consumer fetches the list and persists the choice.',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
args: {
|
|
26
|
+
models: MODELS,
|
|
27
|
+
selectedModelId: 'phoenix',
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
disabled: { control: 'boolean' },
|
|
31
|
+
side: {
|
|
32
|
+
control: 'select',
|
|
33
|
+
options: ['top', 'right', 'bottom', 'left'],
|
|
34
|
+
},
|
|
35
|
+
align: { control: 'select', options: ['start', 'center', 'end'] },
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<typeof CkModelSelector>;
|
|
42
|
+
|
|
43
|
+
const defaultTemplateSource = `<script setup lang="ts">
|
|
44
|
+
import { ref } from 'vue';
|
|
45
|
+
import { CkModelSelector, type CkModelOption } from '@aleph-alpha/chat-kit';
|
|
46
|
+
|
|
47
|
+
const models: CkModelOption[] = [
|
|
48
|
+
{ id: 'kimi', label: 'Kimi' },
|
|
49
|
+
{ id: 'phoenix', label: 'Phoenix' },
|
|
50
|
+
];
|
|
51
|
+
const selectedModelId = ref('phoenix');
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<CkModelSelector
|
|
56
|
+
:models="models"
|
|
57
|
+
v-model:selected-model-id="selectedModelId"
|
|
58
|
+
/>
|
|
59
|
+
</template>`;
|
|
60
|
+
|
|
61
|
+
const renderStory = (args: Story['args']) => ({
|
|
62
|
+
components: { CkModelSelector },
|
|
63
|
+
setup() {
|
|
64
|
+
const selectedModelId = ref(args?.selectedModelId ?? null);
|
|
65
|
+
return { args, selectedModelId };
|
|
66
|
+
},
|
|
67
|
+
template: `
|
|
68
|
+
<div class="bg-background-surface-primary p-8">
|
|
69
|
+
<CkModelSelector
|
|
70
|
+
v-bind="args"
|
|
71
|
+
v-model:selected-model-id="selectedModelId"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
`,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Default picker with a current selection. Opens upward and aligns to the
|
|
79
|
+
* end, matching its intended spot next to a send button.
|
|
80
|
+
*/
|
|
81
|
+
export const Default: Story = {
|
|
82
|
+
render: renderStory,
|
|
83
|
+
parameters: { docs: { source: { code: defaultTemplateSource } } },
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* No selection yet — the trigger shows the placeholder label until the user
|
|
88
|
+
* picks a model.
|
|
89
|
+
*/
|
|
90
|
+
export const Placeholder: Story = {
|
|
91
|
+
args: { selectedModelId: null },
|
|
92
|
+
render: renderStory,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Disabled trigger — e.g. while the model list is still loading.
|
|
97
|
+
*/
|
|
98
|
+
export const Disabled: Story = {
|
|
99
|
+
args: { disabled: true },
|
|
100
|
+
render: renderStory,
|
|
101
|
+
};
|