@aleph-alpha/chat-kit 6.6.0 → 6.7.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.
Files changed (65) hide show
  1. package/dist/{CkHistory.vue_vue_type_script_setup_true_lang-BnUMeeto.js → CkHistory.vue_vue_type_script_setup_true_lang-DF5yUf7K.js} +605 -145
  2. package/dist/chat-kit.css +1 -1
  3. package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +4 -4
  4. package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts +1 -1
  5. package/dist/components/base/CkToolApproval/ApprovalCard.vue.d.ts +21 -0
  6. package/dist/components/base/CkToolApproval/ApprovalCard.vue.d.ts.map +1 -0
  7. package/dist/components/base/CkToolApproval/ArgumentsJson.vue.d.ts +10 -0
  8. package/dist/components/base/CkToolApproval/ArgumentsJson.vue.d.ts.map +1 -0
  9. package/dist/components/base/CkToolApproval/BodyBoundary.vue.d.ts +15 -0
  10. package/dist/components/base/CkToolApproval/BodyBoundary.vue.d.ts.map +1 -0
  11. package/dist/components/base/CkToolApproval/CardHeading.vue.d.ts +22 -0
  12. package/dist/components/base/CkToolApproval/CardHeading.vue.d.ts.map +1 -0
  13. package/dist/components/base/CkToolApproval/CkToolApproval.stories.d.ts +80 -0
  14. package/dist/components/base/CkToolApproval/CkToolApproval.stories.d.ts.map +1 -0
  15. package/dist/components/base/CkToolApproval/CkToolApproval.vue.d.ts +18 -0
  16. package/dist/components/base/CkToolApproval/CkToolApproval.vue.d.ts.map +1 -0
  17. package/dist/components/base/CkToolApproval/ResultRow.vue.d.ts +20 -0
  18. package/dist/components/base/CkToolApproval/ResultRow.vue.d.ts.map +1 -0
  19. package/dist/components/base/CkToolApproval/badge.d.ts +3 -0
  20. package/dist/components/base/CkToolApproval/badge.d.ts.map +1 -0
  21. package/dist/components/base/CkToolApproval/index.d.ts +3 -0
  22. package/dist/components/base/CkToolApproval/index.d.ts.map +1 -0
  23. package/dist/components/base/CkToolApproval/outcomes.d.ts +28 -0
  24. package/dist/components/base/CkToolApproval/outcomes.d.ts.map +1 -0
  25. package/dist/components/base/CkToolApproval/serializeArguments.d.ts +13 -0
  26. package/dist/components/base/CkToolApproval/serializeArguments.d.ts.map +1 -0
  27. package/dist/components/base/CkToolApproval/toolTitle.d.ts +7 -0
  28. package/dist/components/base/CkToolApproval/toolTitle.d.ts.map +1 -0
  29. package/dist/components/base/CkToolApproval/types.d.ts +102 -0
  30. package/dist/components/base/CkToolApproval/types.d.ts.map +1 -0
  31. package/dist/components/base/index.d.ts +2 -0
  32. package/dist/components/base/index.d.ts.map +1 -1
  33. package/dist/components/index.d.ts +2 -2
  34. package/dist/components/index.d.ts.map +1 -1
  35. package/dist/components/index.js +4 -3
  36. package/dist/{createCrepeEditor-BGSlwmKn.js → createCrepeEditor-DSfByw4o.js} +1 -1
  37. package/dist/handlers/index.js +1 -1
  38. package/dist/handlers/useChatKitLabels.d.ts +39 -0
  39. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +6 -5
  43. package/dist/{useChatKitLabels-DxW0N5U-.js → useChatKitLabels-ky3JI9gf.js} +13 -0
  44. package/package.json +2 -2
  45. package/src/components/base/CkToolApproval/ApprovalCard.vue +30 -0
  46. package/src/components/base/CkToolApproval/ArgumentsJson.vue +48 -0
  47. package/src/components/base/CkToolApproval/BodyBoundary.vue +26 -0
  48. package/src/components/base/CkToolApproval/CardHeading.vue +47 -0
  49. package/src/components/base/CkToolApproval/CkToolApproval.spec.ts +680 -0
  50. package/src/components/base/CkToolApproval/CkToolApproval.stories.ts +661 -0
  51. package/src/components/base/CkToolApproval/CkToolApproval.vue +240 -0
  52. package/src/components/base/CkToolApproval/ResultRow.vue +52 -0
  53. package/src/components/base/CkToolApproval/badge.ts +2 -0
  54. package/src/components/base/CkToolApproval/exports.spec.ts +22 -0
  55. package/src/components/base/CkToolApproval/index.ts +2 -0
  56. package/src/components/base/CkToolApproval/outcomes.ts +95 -0
  57. package/src/components/base/CkToolApproval/serializeArguments.ts +18 -0
  58. package/src/components/base/CkToolApproval/toolTitle.spec.ts +23 -0
  59. package/src/components/base/CkToolApproval/toolTitle.ts +19 -0
  60. package/src/components/base/CkToolApproval/types.ts +118 -0
  61. package/src/components/base/index.ts +11 -0
  62. package/src/components/index.ts +9 -0
  63. package/src/handlers/useChatKitLabels.ts +39 -0
  64. package/src/index.ts +9 -0
  65. package/src/test-empty.css +1 -0
@@ -98,6 +98,32 @@ export type ChatKitLabels = {
98
98
  * `defaultChatKitLabels`.
99
99
  */
100
100
  citationSourceLabel?: string;
101
+ /** Label of the button that allows the tool call in `CkToolApproval`. */
102
+ toolApprovalAllow?: string;
103
+ /** Label of the button that denies the tool call in `CkToolApproval`. */
104
+ toolApprovalDeny?: string;
105
+ /** Result line of an allowed `CkToolApproval`, before the optional summary. */
106
+ toolApprovalAllowedResult?: string;
107
+ /** Result line of a denied `CkToolApproval`. */
108
+ toolApprovalDeniedResult?: string;
109
+ /** Result line of a `CkToolApproval` whose allowed call failed. */
110
+ toolApprovalFailedResult?: string;
111
+ /** Result line of a `CkToolApproval` the user skipped by sending a new message. */
112
+ toolApprovalSkippedResult?: string;
113
+ /** Detail after the denied, failed and skipped result lines of `CkToolApproval` when no `summary` is given. */
114
+ toolApprovalNothingChanged?: string;
115
+ /** Note under the arguments of `CkToolApproval` when they were too long to show in full. */
116
+ toolApprovalArgumentsTruncated?: string;
117
+ /** Shown instead of the arguments of `CkToolApproval` when they cannot be turned into JSON; Allow is then off. */
118
+ toolApprovalArgumentsUnreadable?: string;
119
+ /** Status badge of an allowed `CkToolApproval`. */
120
+ toolApprovalAllowedBadge?: string;
121
+ /** Status badge of a denied `CkToolApproval`. */
122
+ toolApprovalDeniedBadge?: string;
123
+ /** Status badge of a `CkToolApproval` whose allowed call failed. */
124
+ toolApprovalFailedBadge?: string;
125
+ /** Status badge of a `CkToolApproval` the user skipped by sending a new message. */
126
+ toolApprovalSkippedBadge?: string;
101
127
  /** Fallback title used by `CkHistory` when a conversation has no `title`. */
102
128
  historyItemUntitled: string;
103
129
  /** Accessible name for the trailing kebab trigger on each `CkHistory` row. */
@@ -167,6 +193,19 @@ export const defaultChatKitLabels = {
167
193
  markdownTableLabel: 'Table',
168
194
  citationOpenSource: 'Open source',
169
195
  citationSourceLabel: 'Source',
196
+ toolApprovalAllow: 'Allow',
197
+ toolApprovalDeny: 'Deny',
198
+ toolApprovalAllowedResult: 'Approved by you',
199
+ toolApprovalDeniedResult: 'Denied by you',
200
+ toolApprovalFailedResult: 'Failed',
201
+ toolApprovalSkippedResult: 'Skipped',
202
+ toolApprovalNothingChanged: 'Nothing was updated',
203
+ toolApprovalArgumentsTruncated: 'Arguments shortened for display',
204
+ toolApprovalArgumentsUnreadable: "These arguments can't be shown",
205
+ toolApprovalAllowedBadge: 'Allowed',
206
+ toolApprovalDeniedBadge: 'Denied',
207
+ toolApprovalFailedBadge: 'Failed',
208
+ toolApprovalSkippedBadge: 'Skipped',
170
209
  historyItemUntitled: 'Untitled conversation',
171
210
  historyItemActionAriaLabel: 'Conversation options',
172
211
  historyItemEditAction: 'Edit',
package/src/index.ts CHANGED
@@ -97,6 +97,7 @@ export {
97
97
  CkRegenerateMessageButton,
98
98
  CkSendIcon,
99
99
  CkStopIcon,
100
+ CkToolApproval,
100
101
  CkUserMessage,
101
102
  CkEditableUserMessage,
102
103
  CkMilkdownEditor,
@@ -141,6 +142,14 @@ export type {
141
142
  CkModelSelectorProps,
142
143
  CkModelSelectorEmits,
143
144
  CkPromptMenuButtonProps,
145
+ CkToolApprovalProps,
146
+ CkToolApprovalEmits,
147
+ CkToolApprovalSlots,
148
+ CkToolApprovalRequest,
149
+ CkToolApprovalStatus,
150
+ CkToolApprovalBodyComponents,
151
+ CkToolApprovalBodyProps,
152
+ CkToolApprovalExposed,
144
153
  CkUserMessageProps,
145
154
  CkEditableUserMessageProps,
146
155
  CkEditableUserMessageEmits,
@@ -0,0 +1 @@
1
+ /* Stand-in for uno:default.css in tests, see vitest.config.ts. */