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