feat(prompts): update assistant descriptions and add intent-specific templates

- Updated the assistant descriptions in various prompt templates to specify that they are developed by Tencent.
- Added new intent-specific system prompt templates for greeting, chitchat, follow-up, image analysis, summarization, and web search unavailability scenarios.
- Enhanced citation rules in the system prompts to ensure proper inline citation formatting.
- Refactored the rewrite prompt to classify user intent more accurately and output structured JSON responses.
This commit is contained in:
wizardchen
2026-03-23 01:57:06 +08:00
committed by lyingbug
parent 109393dd16
commit 052be53c42
44 changed files with 1272 additions and 1323 deletions
@@ -845,18 +845,36 @@ const buildFullEventList = (stream: any[]) => {
if (isThinkingLikeEvent(event) && result.length > 0) {
const prev = result[result.length - 1];
if (isThinkingLikeEvent(prev)) {
// Merge into previous: combine content
const prevContent = prev._mergedContent || getThinkingContent(prev);
const curContent = getThinkingContent(event);
// Deduplicate: when a tool_call thinking event's thought content was
// already delivered via streaming thinking events (same text), skip it.
if (curContent && prevContent && prevContent.includes(curContent)) {
continue;
}
if (curContent && prevContent && curContent.includes(prevContent)) {
// Current fully contains previous — replace instead of appending
result[result.length - 1] = {
type: 'thinking',
event_id: prev.event_id,
content: curContent,
thinking: prev.thinking || event.thinking,
timestamp: prev.timestamp,
_mergedContent: curContent,
};
continue;
}
// Normal merge: combine non-overlapping content
const merged = [prevContent, curContent].filter(Boolean).join('\n\n');
// Replace previous with a merged thinking event
result[result.length - 1] = {
type: 'thinking',
event_id: prev.event_id,
content: merged,
thinking: prev.thinking || event.thinking,
timestamp: prev.timestamp,
_mergedContent: merged, // track for further merges
_mergedContent: merged,
};
continue;
}
@@ -317,7 +317,7 @@ onBeforeUnmount(() => {
.content-wrapper {
background: var(--td-bg-color-container);
border-radius: 6px;
padding: 8px 12px;
padding: 8px 0px;
transition: all 0.2s ease;
}