@aleph-alpha/chat-kit 1.16.0 → 1.17.1

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/README.md CHANGED
@@ -18,7 +18,7 @@ Chat Kit is organised into **three layers**:
18
18
  2. **Handlers** — Reactive utilities for chat state management: `useMessageHandler` (conversation tree), `useMarkdownParser` (markdown pipeline), `useChatKitLabels` (i18n).
19
19
  3. **Services** _(under development)_ — Abstract `ChatService` / `IChatService` for backend communication and streaming. Not ready for production use.
20
20
 
21
- `useChat` _(under development)_ lives in `composables/` as a planned high-level orchestrator that composes handlers and services into a single API.
21
+ `useChat` _(under development)_ lives in `composables/` as a planned high-level orchestrator that composes handlers and services into a single API
22
22
 
23
23
  ## Usage
24
24
 
@@ -80,7 +80,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
80
80
  };
81
81
  }
82
82
  });
83
- const _hoisted_1$9 = { class: "border-border-surface-default flex w-full flex-col gap-6 border-b pb-6" };
83
+ const _hoisted_1$9 = { class: "flex w-full flex-col gap-6 pb-6" };
84
84
  const _hoisted_2$6 = {
85
85
  key: 0,
86
86
  class: "flex items-start gap-3"
@@ -1815,13 +1815,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1815
1815
  ]),
1816
1816
  _: 3
1817
1817
  }, 8, ["class", "style"]),
1818
- canCollapse.value && !isExpanded.value ? (openBlock(), createElementBlock("button", {
1818
+ canCollapse.value && !isExpanded.value ? (openBlock(), createBlock(unref(UiButton), {
1819
1819
  key: 0,
1820
- type: "button",
1821
- "data-testid": "ck-history-show-all",
1822
- class: "mt-1 w-full rounded-lg px-2 py-2 text-center body-14-medium text-content-on-surface-muted transition-colors hover:bg-background-surface-muted-subtle",
1820
+ variant: "secondary",
1821
+ "data-testid": "ck-history-show-all-conversations",
1822
+ class: "mt-1 w-full",
1823
1823
  onClick: toggleExpanded
1824
- }, toDisplayString(unref(labels).historyShowAll), 1)) : createCommentVNode("", true)
1824
+ }, {
1825
+ default: withCtx(() => [
1826
+ createTextVNode(toDisplayString(unref(labels).historyShowAll), 1)
1827
+ ]),
1828
+ _: 1
1829
+ })) : createCommentVNode("", true)
1825
1830
  ]);
1826
1831
  };
1827
1832
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CkAgentMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkAgentMessage/CkAgentMessage.vue"],"names":[],"mappings":"AA4GA,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AACjF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK9C,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CkAgentMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkAgentMessage/CkAgentMessage.vue"],"names":[],"mappings":"AAwGA,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AACjF,KAAK,WAAW,GAAG,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ACV,CAAA;CACD,CAAC"}
@@ -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-AtcxFGLn.js";
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-DxUWj4Vh.js";
2
2
  export {
3
3
  _ as CkAgentMessage,
4
4
  a as CkConversation,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { u } from "./useMessageHandler-CMdy-lm0.js";
2
2
  import { C, d, p, u as u2, a } from "./useChatKitLabels-BC6ItJc6.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-AtcxFGLn.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-DxUWj4Vh.js";
5
5
  export {
6
6
  C as CHAT_KIT_LABELS,
7
7
  _ as CkAgentMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-alpha/chat-kit",
3
- "version": "1.16.0",
3
+ "version": "1.17.1",
4
4
  "description": "Chat kit package for building chat interfaces with Vue",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -3,9 +3,7 @@ defineOptions({ name: 'CkAgentMessage' });
3
3
  </script>
4
4
 
5
5
  <template>
6
- <div
7
- class="border-border-surface-default flex w-full flex-col gap-6 border-b pb-6"
8
- >
6
+ <div class="flex w-full flex-col gap-6 pb-6">
9
7
  <div v-if="$slots.icon || $slots.header" class="flex items-start gap-3">
10
8
  <div
11
9
  v-if="$slots.icon"
@@ -222,7 +222,9 @@ describe('CkHistory', () => {
222
222
 
223
223
  const links = screen.getAllByRole('link');
224
224
  expect(links).toHaveLength(5);
225
- expect(screen.getByTestId('ck-history-show-all')).toBeInTheDocument();
225
+ expect(
226
+ screen.getByTestId('ck-history-show-all-conversations'),
227
+ ).toBeInTheDocument();
226
228
  });
227
229
 
228
230
  it('does not show the "Show all" button when conversations fit within the limit', () => {
@@ -235,7 +237,7 @@ describe('CkHistory', () => {
235
237
  });
236
238
 
237
239
  expect(
238
- screen.queryByTestId('ck-history-show-all'),
240
+ screen.queryByTestId('ck-history-show-all-conversations'),
239
241
  ).not.toBeInTheDocument();
240
242
  });
241
243
 
@@ -252,11 +254,11 @@ describe('CkHistory', () => {
252
254
 
253
255
  expect(screen.getAllByRole('link')).toHaveLength(5);
254
256
 
255
- await user.click(screen.getByTestId('ck-history-show-all'));
257
+ await user.click(screen.getByTestId('ck-history-show-all-conversations'));
256
258
 
257
259
  expect(screen.getAllByRole('link')).toHaveLength(8);
258
260
  expect(
259
- screen.queryByTestId('ck-history-show-all'),
261
+ screen.queryByTestId('ck-history-show-all-conversations'),
260
262
  ).not.toBeInTheDocument();
261
263
  });
262
264
 
@@ -271,7 +273,7 @@ describe('CkHistory', () => {
271
273
 
272
274
  expect(screen.getAllByRole('link')).toHaveLength(8);
273
275
  expect(
274
- screen.queryByTestId('ck-history-show-all'),
276
+ screen.queryByTestId('ck-history-show-all-conversations'),
275
277
  ).not.toBeInTheDocument();
276
278
  });
277
279
  });
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref } from 'vue';
3
3
  import {
4
+ UiButton,
4
5
  UiIcon,
5
6
  UiSidebarPopoverMenu,
6
7
  UiSidebarPopoverMenuItem,
@@ -163,14 +164,14 @@ function handleRowClick(c: Conversation, event: MouseEvent) {
163
164
  </template>
164
165
  </CkHistoryWrapper>
165
166
 
166
- <button
167
+ <UiButton
167
168
  v-if="canCollapse && !isExpanded"
168
- type="button"
169
- data-testid="ck-history-show-all"
170
- class="mt-1 w-full rounded-lg px-2 py-2 text-center body-14-medium text-content-on-surface-muted transition-colors hover:bg-background-surface-muted-subtle"
169
+ variant="secondary"
170
+ data-testid="ck-history-show-all-conversations"
171
+ class="mt-1 w-full"
171
172
  @click="toggleExpanded"
172
173
  >
173
174
  {{ labels.historyShowAll }}
174
- </button>
175
+ </UiButton>
175
176
  </div>
176
177
  </template>