@matechat/core 1.11.0 → 1.11.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/Mention/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "./index.css";
1
2
  import { ref as T, reactive as F, watch as K, nextTick as U, onMounted as G, onBeforeUnmount as J, defineComponent as Q, createElementBlock as O, openBlock as C, Fragment as X, createVNode as P, createBlock as Y, unref as A, withCtx as $, renderSlot as R, Teleport as Z, Transition as ee, createCommentVNode as te, normalizeStyle as ne, normalizeClass as oe } from "vue";
2
3
  import { PopperTrigger as re } from "@matechat/core/PopperTrigger";
3
4
  import { computePosition as ie, offset as le } from "@floating-ui/dom";
package/README.md CHANGED
@@ -95,7 +95,7 @@ createApp(App).use(MateChat).mount('#app');
95
95
  :avatarConfig="{ imgSrc: 'https://matechat.gitcode.com/png/demo/userAvatar.svg' }"
96
96
  >
97
97
  </McBubble>
98
- <McBubble v-else :content="msg.content" :avatarConfig="{ imgSrc: 'https://matechat.gitcode.com/logo.svg' }"> </McBubble>
98
+ <McBubble v-else :content="msg.content" :avatarConfig="{ imgSrc: 'https://matechat.gitcode.com/logo.svg' }" :loading="msg.loading"> </McBubble>
99
99
  </template>
100
100
  </McLayoutContent>
101
101
  <div class="shortcut" style="display: flex; align-items: center; gap: 8px">
@@ -302,16 +302,14 @@ $ npm install openai
302
302
  ```js
303
303
  import OpenAI from 'openai';
304
304
 
305
- const client = ref<OpenAI>();
306
-
307
- client.value = new OpenAI({
305
+ const client = new OpenAI({
308
306
  apiKey: '', // 模型APIKey
309
307
  baseURL: '', // 模型API地址
310
308
  dangerouslyAllowBrowser: true,
311
309
  });
312
310
 
313
311
  const fetchData = (ques) => {
314
- const completion = await client.value!.chat.completions.create({
312
+ const completion = await client.chat.completions.create({
315
313
  model: 'my-model', // 替换为自己的model名称
316
314
  messages: [
317
315
  { role: 'user', content: ques },
@@ -354,9 +352,7 @@ const onSubmit = (evt) => {
354
352
  ```ts
355
353
  import OpenAI from 'openai';
356
354
 
357
- const client = ref<OpenAI>();
358
-
359
- client.value = new OpenAI({
355
+ const client = new OpenAI({
360
356
  apiKey: '', // 模型APIKey
361
357
  baseURL: '', // 模型API地址
362
358
  dangerouslyAllowBrowser: true,
@@ -383,7 +379,7 @@ const fetchData = async (ques) => {
383
379
  id: '',
384
380
  loading: true,
385
381
  });
386
- const completion = await client.value!.chat.completions.create({
382
+ const completion = await client.chat.completions.create({
387
383
  model: 'my-model', // 替换为自己的model名称
388
384
  messages: [{ role: 'user', content: ques }],
389
385
  stream: true, // 为 true 则开启接口的流式返回
@@ -409,8 +405,8 @@ const fetchData = async (ques) => {
409
405
  ```bash
410
406
  git clone git@gitcode.com:DevCloudFE/MateChat.git
411
407
  cd matechat
412
- npm i
413
- npm run docs:dev
408
+ pnpm i
409
+ pnpm run docs:dev
414
410
  ```
415
411
 
416
412
  ## 📅 特性规划
@@ -423,7 +419,7 @@ MateChat 在不断的演进中,你可在这里了解我们的计划:[MateCha
423
419
 
424
420
  ## 谁在使用
425
421
 
426
- [CodeArts盘古助手](https://www.huaweicloud.com/product/codeartside/snap.html)
422
+ [华为云CodeArts智能助手](https://www.huaweicloud.com/product/codeartside/snap.html)
427
423
 
428
424
  [InsCode AI IDE](https://inscode.csdn.net/)
429
425
 
package/index.d.ts CHANGED
@@ -1,6 +1,18 @@
1
- import type { App } from 'vue';
2
- declare function install(app: App): void
3
- declare const _default: {
4
- install: typeof install;
5
- };
6
- export default _default;
1
+ import { McAttachment } from './Attachment';
2
+ import { McBubble } from './Bubble';
3
+ import { McFileList } from './FileList';
4
+ import { McHeader } from './Header';
5
+ import { McInput } from './Input';
6
+ import { McIntroduction } from './Introduction';
7
+ import { McLayoutAside, McLayoutContent, McLayoutHeader, McLayout, McLayoutSender } from './Layout';
8
+ import { McList } from './List';
9
+ import { useMcI18n, McLocale } from './Locale';
10
+ import { McMarkdownCard } from './MarkdownCard';
11
+ import { McMention } from './Mention';
12
+ import { McPrompt } from './Prompt';
13
+ import { McToolbar, McCopyIcon, McDeleteIcon, McLikeIcon, McRefreshIcon, McShareIcon } from './Toolbar';
14
+ export { McAttachment, McBubble, McFileList, McHeader, McInput, McIntroduction, McLayoutAside, McLayoutContent, McLayoutHeader, McLayout, McLayoutSender, McList, useMcI18n, McLocale, McMarkdownCard, McMention, McPrompt, McToolbar, McCopyIcon, McDeleteIcon, McLikeIcon, McRefreshIcon, McShareIcon };
15
+ declare const _default: {
16
+ install(app: any): void;
17
+ };
18
+ export default _default;
package/mate-chat.js CHANGED
@@ -1,4 +1,6 @@
1
+ import { McAttachment } from './Attachment';
1
2
  import { McBubble } from './Bubble';
3
+ import { McFileList } from './FileList';
2
4
  import { McHeader } from './Header';
3
5
  import { McInput } from './Input';
4
6
  import { McIntroduction } from './Introduction';
@@ -8,9 +10,12 @@ import { useMcI18n, McLocale } from './Locale';
8
10
  import { McMarkdownCard } from './MarkdownCard';
9
11
  import { McMention } from './Mention';
10
12
  import { McPrompt } from './Prompt';
13
+ import { McToolbar, McCopyIcon, McDeleteIcon, McLikeIcon, McRefreshIcon, McShareIcon } from './Toolbar';
11
14
 
12
15
  const installs = [
16
+ McAttachment,
13
17
  McBubble,
18
+ McFileList,
14
19
  McHeader,
15
20
  McInput,
16
21
  McIntroduction,
@@ -19,11 +24,14 @@ const installs = [
19
24
  McLocale,
20
25
  McMarkdownCard,
21
26
  McMention,
22
- McPrompt
27
+ McPrompt,
28
+ McToolbar
23
29
  ];
24
30
 
25
31
  export {
32
+ McAttachment,
26
33
  McBubble,
34
+ McFileList,
27
35
  McHeader,
28
36
  McInput,
29
37
  McIntroduction,
@@ -37,7 +45,13 @@ export {
37
45
  McLocale,
38
46
  McMarkdownCard,
39
47
  McMention,
40
- McPrompt
48
+ McPrompt,
49
+ McToolbar,
50
+ McCopyIcon,
51
+ McDeleteIcon,
52
+ McLikeIcon,
53
+ McRefreshIcon,
54
+ McShareIcon
41
55
  };
42
56
 
43
57
  export default {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matechat/core",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "license": "MIT",
5
5
  "description": "前端智能化场景解决方案UI库,轻松构建你的AI应用。",
6
6
  "keywords": [
@@ -32,8 +32,5 @@
32
32
  },
33
33
  "peerDependencies": {
34
34
  "vue": "^3.5.13"
35
- },
36
- "publishConfig": {
37
- "access": "public"
38
35
  }
39
36
  }