@vyr/service-chat 0.0.34 → 0.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyr/service-chat",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "keywords": [],
@@ -15,4 +15,4 @@
15
15
  "devDependencies": {
16
16
  "sass": "^1.32.0"
17
17
  }
18
- }
18
+ }
@@ -18,7 +18,7 @@
18
18
  <script setup lang="ts">
19
19
  import { McInput } from '@matechat/core';
20
20
  import { DataService, DraggableService, runtime } from '@vyr/runtime';
21
- import { DraggableController } from '@vyr/design';
21
+ import { DraggableController, notify } from '@vyr/design';
22
22
  import { language } from '../locale';
23
23
  import { ChatSession } from '../chat';
24
24
  import { ChatService } from '../ChatService';
@@ -34,6 +34,7 @@ const updateQuestion = (value: string) => {
34
34
  let result: ChatSession | null = null
35
35
 
36
36
  const onSubmit = async () => {
37
+ if (!chatService.manager.window.agentId) return notify.send(language.get('chat.model.required'))
37
38
  if (chatService.manager.window.runing) return
38
39
  chatService.manager.window.runing = true
39
40
  try {
@@ -1,6 +1,7 @@
1
1
  import { LanguageProvider } from '@vyr/locale'
2
2
 
3
3
  interface ZhCNLanguageProvider extends LanguageProvider {
4
+ 'chat.model.required': string
4
5
  'chat.introduction.title': string
5
6
  'chat.introduction.message': string
6
7
  'chat.input.placeholder': string
@@ -24,6 +25,7 @@ const zhCnLanguageProvider: ZhCNLanguageProvider = {
24
25
  id: 'zh_CN',
25
26
  name: '@vyr/service-chat',
26
27
 
28
+ 'chat.model.required': '请配置对话模型后使用',
27
29
  'chat.introduction.title': '欢迎!我是您的AI伙伴,助您轻松完成任务。',
28
30
  'chat.introduction.message': '您只需给我一个清晰的目标,我就会自动将它分解成具体步骤,并一步步为您完成。',
29
31
  'chat.input.placeholder': '请输入您的问题,并按Enter发送,按Shift + Enter换行',