|
|
@@ -11,6 +11,7 @@ import { knowledgeApi } from '../api/knowledge'
|
|
|
import { useAppStore } from '../store/app'
|
|
|
import { Spinner } from '../components/ui'
|
|
|
import { clsx } from '../lib/clsx'
|
|
|
+import { useMode } from '../api/mode'
|
|
|
|
|
|
// ── Types ─────────────────────────────────────────────────────────
|
|
|
|
|
|
@@ -605,6 +606,11 @@ export default function Chat() {
|
|
|
const navigate = useNavigate()
|
|
|
const { apiKey } = useAppStore()
|
|
|
const qc = useQueryClient()
|
|
|
+ // CR §10.3: in desktop mode this surface is a "专业任务工作台" for
|
|
|
+ // scientists, not a generic chat. We keep the same component but
|
|
|
+ // reframe the empty-state + input affordances.
|
|
|
+ const { data: modeData } = useMode()
|
|
|
+ const isDesktop = (modeData?.mode ?? 'desktop') === 'desktop'
|
|
|
|
|
|
const [messages, setMessages] = useState<Message[]>([])
|
|
|
const [historyLoaded, setHistoryLoaded] = useState(false)
|
|
|
@@ -1120,7 +1126,11 @@ export default function Chat() {
|
|
|
<p className="text-sm font-medium text-gray-900 mb-1">
|
|
|
{agent?.name ?? '智能体'} 已就绪
|
|
|
</p>
|
|
|
- <p className="text-xs text-gray-500">发送消息开始对话,Shift+Enter 换行</p>
|
|
|
+ <p className="text-xs text-gray-500">
|
|
|
+ {isDesktop
|
|
|
+ ? '输入你的研究任务开始,Shift+Enter 换行'
|
|
|
+ : '发送消息开始对话,Shift+Enter 换行'}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<div className="flex flex-wrap gap-2 justify-center max-w-lg">
|
|
|
{EXAMPLES.map(ex => (
|
|
|
@@ -1309,7 +1319,9 @@ export default function Chat() {
|
|
|
placeholder={
|
|
|
continueFromRunId
|
|
|
? '继续此 run — 输入下一步指令…(Enter 发送)'
|
|
|
- : '发消息… (Enter 发送,Shift+Enter 换行)'
|
|
|
+ : isDesktop
|
|
|
+ ? '描述你的研究任务…(Enter 发送,Shift+Enter 换行)'
|
|
|
+ : '发消息… (Enter 发送,Shift+Enter 换行)'
|
|
|
}
|
|
|
rows={1}
|
|
|
disabled={streaming}
|