st-comp 0.0.249 → 0.0.250

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,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.249",
4
+ "version": "0.0.250",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -1,24 +1,25 @@
1
1
  <script setup>
2
2
  import dayjs from "dayjs";
3
3
  import { ElMessage } from "element-plus";
4
- import { ref, nextTick, watch } from "vue";
4
+ import { ref, nextTick, watch, onMounted } from "vue";
5
5
  import { sendToBaiLianAppNonStreaming } from "../../public/aiTools";
6
6
  import { UserFilled, Service, Promotion } from "@element-plus/icons-vue";
7
7
 
8
8
  const emit = defineEmits(["callBack"]);
9
+ const props = defineProps({
10
+ defaultMessage: {
11
+ type: String,
12
+ default: "你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询\n\n示例: \n科创板里总市值大于1000W的, 帮我按照总市值升序进行排序",
13
+ },
14
+ });
9
15
 
10
16
  const visible = ref(false);
11
17
  const isSending = ref(false);
12
18
  const isThinking = ref(false);
13
19
 
20
+ // 消息列表
14
21
  const messageListRef = ref(null);
15
- const messages = ref([
16
- {
17
- role: "assistant",
18
- time: dayjs().format("HH:mm"),
19
- content: "你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询\n\n示例: \n帮我查找A股,总市值1000亿,流通股本大于等于1000万",
20
- },
21
- ]);
22
+ const messages = ref([]);
22
23
  const inputMessage = ref("");
23
24
 
24
25
  // 发送消息
@@ -68,6 +69,13 @@ const scrollToBottom = async () => {
68
69
  messageListRef.value.scrollTop = messageListRef.value.scrollHeight;
69
70
  }
70
71
  };
72
+ onMounted(() => {
73
+ messages.value.push({
74
+ role: "assistant",
75
+ time: dayjs().format("HH:mm"),
76
+ content: props.defaultMessage,
77
+ });
78
+ });
71
79
  watch(
72
80
  () => messages.value,
73
81
  () => {
@@ -217,6 +217,7 @@ watch(
217
217
  </el-button>
218
218
  <st-varietyAiHelper
219
219
  ref="VarietyAiHelperRef"
220
+ defaultMessage="666"
220
221
  @callBack="varietyAiHelperCallBack"
221
222
  />
222
223
  <st-varietySearch