refactor: 后端拆分为 src/server 模块,前端迁移至路由分页(Chat/Skills);设置改为抽屉、新增工具卡片组件;提交测试用 .env
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
<template>
|
||||
<div class="input-bar">
|
||||
<textarea
|
||||
ref="ta"
|
||||
v-model="text"
|
||||
class="ta"
|
||||
:disabled="disabled"
|
||||
rows="1"
|
||||
placeholder="输入消息,Enter 发送,Shift+Enter 换行"
|
||||
@input="autoGrow"
|
||||
@keydown.enter.exact.prevent="submit"
|
||||
></textarea>
|
||||
<button class="send" :disabled="disabled || !text.trim()" @click="submit">
|
||||
<span v-if="!disabled">➤</span>
|
||||
<span v-else class="spinner"></span>
|
||||
</button>
|
||||
<div class="input-box">
|
||||
<textarea
|
||||
ref="ta"
|
||||
v-model="text"
|
||||
class="ta"
|
||||
:disabled="disabled"
|
||||
rows="1"
|
||||
placeholder="输入消息,Enter 发送,Shift+Enter 换行"
|
||||
@input="autoGrow"
|
||||
@keydown.enter.exact.prevent="submit"
|
||||
></textarea>
|
||||
<button class="send" :disabled="disabled || !text.trim()" @click="submit">
|
||||
<span v-if="!disabled">➤</span>
|
||||
<span v-else class="spinner"></span>
|
||||
</button>
|
||||
</div>
|
||||
<p class="tip">小鑫可以读写文件、分析 Excel、执行命令(危险操作需你审批)</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -44,21 +47,30 @@ function submit() {
|
||||
|
||||
<style scoped>
|
||||
.input-bar {
|
||||
padding: 12px 20px 16px;
|
||||
}
|
||||
.input-box {
|
||||
display: flex; align-items: flex-end; gap: 10px;
|
||||
padding: 14px 20px;
|
||||
background: var(--surface);
|
||||
border-top: 1px solid var(--border);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
padding: 8px 8px 8px 16px;
|
||||
box-shadow: var(--shadow);
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.input-box:focus-within {
|
||||
border-color: var(--primary);
|
||||
box-shadow: var(--shadow), 0 0 0 3px var(--primary-soft);
|
||||
}
|
||||
.ta {
|
||||
flex: 1; resize: none; border: 1px solid var(--border);
|
||||
background: var(--surface-2); color: var(--text);
|
||||
border-radius: 14px; padding: 12px 16px; font: inherit; font-size: 14.5px;
|
||||
line-height: 1.5; max-height: 160px; outline: none; transition: border-color 0.15s;
|
||||
flex: 1; resize: none; border: none; outline: none;
|
||||
background: transparent; color: var(--text);
|
||||
font: inherit; font-size: 14.5px; line-height: 1.5;
|
||||
max-height: 160px; padding: 6px 0;
|
||||
}
|
||||
.ta:focus { border-color: var(--primary); }
|
||||
.ta:disabled { opacity: 0.6; }
|
||||
.send {
|
||||
width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 12px;
|
||||
width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 12px;
|
||||
background: var(--primary); color: #fff; cursor: pointer; font-size: 16px;
|
||||
display: grid; place-items: center; transition: 0.15s;
|
||||
}
|
||||
@@ -69,4 +81,5 @@ function submit() {
|
||||
border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.tip { text-align: center; font-size: 12px; color: var(--text-dim); margin: 8px 0 0; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user