feat: 优化系统提示词,强调优先使用 Skill 工具
- 修改 Application.java 中的系统提示词,明确工具优先级 - 强调对于任何用户任务都应优先检查并使用匹配的 Skill - 移除 AskUserQuestionTool 以解决启动错误 - 添加项目文档 CLAUDE.md - 更新前端界面和交互逻辑 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
5f998d1f24
commit
6b602f5cd0
11 files changed
+1250
-230
No files matched your search
@@ -350,11 +350,20 @@ const ChatUI = {
|
||||
|
||||
// 更新头部状态为完成
|
||||
const statusText = detailsHeader.querySelector('.status-text');
|
||||
const statusIcon = detailsHeader.querySelector('.process-status i');
|
||||
const statusContainer = detailsHeader.querySelector('.process-status');
|
||||
|
||||
if (statusText) statusText.textContent = '已完成';
|
||||
if (statusIcon) {
|
||||
statusIcon.setAttribute('data-lucide', 'check-circle');
|
||||
statusIcon.classList.remove('spinning');
|
||||
|
||||
// 替换图标为完成状态(兼容 SVG 和原始 i 标签)
|
||||
if (statusContainer) {
|
||||
// 清除现有图标内容,重新创建 check-circle 图标
|
||||
const iconWrapper = document.createElement('span');
|
||||
iconWrapper.innerHTML = '<i data-lucide="check-circle" class="icon-xs"></i>';
|
||||
// 移除旧的图标元素(第一个子元素,通常是 SVG 或 i 标签)
|
||||
const oldIcon = statusContainer.querySelector('svg, i');
|
||||
if (oldIcon) oldIcon.remove();
|
||||
// 在文本前插入新图标
|
||||
statusContainer.insertBefore(iconWrapper.firstElementChild, statusText);
|
||||
}
|
||||
|
||||
lucide.createIcons();
|
||||
@@ -395,8 +404,42 @@ const ChatUI = {
|
||||
return this.activeProcessContainer.group;
|
||||
}
|
||||
|
||||
this.setFinalResponse(content);
|
||||
return this.activeProcessContainer?.group;
|
||||
// 对于已完成的历史消息,创建一个已完成状态的容器
|
||||
this.createAssistantMessageContainer();
|
||||
const { group, finalResponse, detailsHeader, processDetails } = this.activeProcessContainer;
|
||||
|
||||
// 设置回复内容
|
||||
finalResponse.className = 'final-response';
|
||||
finalResponse.innerHTML = this.renderMarkdown(content);
|
||||
this.addCodeCopyButtons(finalResponse);
|
||||
|
||||
// 更新头部状态为已完成(用于历史消息)
|
||||
const statusText = detailsHeader?.querySelector('.status-text');
|
||||
const statusContainer = detailsHeader?.querySelector('.process-status');
|
||||
|
||||
if (statusText) statusText.textContent = '已完成';
|
||||
if (statusContainer) {
|
||||
const iconWrapper = document.createElement('span');
|
||||
iconWrapper.innerHTML = '<i data-lucide="check-circle" class="icon-xs"></i>';
|
||||
const oldIcon = statusContainer.querySelector('svg, i');
|
||||
if (oldIcon) oldIcon.remove();
|
||||
statusContainer.insertBefore(iconWrapper.firstElementChild, statusText);
|
||||
}
|
||||
|
||||
// 默认折叠历史消息的过程详情
|
||||
processDetails?.classList.add('collapsed');
|
||||
const toggleIcon = detailsHeader?.querySelector('.process-toggle i');
|
||||
if (toggleIcon) {
|
||||
toggleIcon.setAttribute('data-lucide', 'chevron-right');
|
||||
}
|
||||
|
||||
lucide.createIcons();
|
||||
this.scrollToBottom();
|
||||
|
||||
// 重置活动容器
|
||||
this.activeProcessContainer = null;
|
||||
|
||||
return group;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user