更新对话标题和 MCP 描述并重新打包 CentOS 7 发布包
This commit is contained in:
@@ -7142,6 +7142,11 @@
|
||||
chatAgentBtn.setAttribute('aria-expanded', willOpen ? 'true' : 'false');
|
||||
}
|
||||
|
||||
function setChatTitle(title) {
|
||||
chatTitle.textContent = title || '新会话';
|
||||
document.title = currentSessionId ? chatTitle.textContent : 'CC-Web';
|
||||
}
|
||||
|
||||
function resetChatView(agent) {
|
||||
abortToolDetailRequests();
|
||||
clearPendingMissingSessionConfirmation();
|
||||
@@ -7177,7 +7182,7 @@
|
||||
collabAgentIdsByToolUseId = new Map();
|
||||
closedCollabAgentIdsByToolUseId = new Map();
|
||||
updateGenerationControls();
|
||||
chatTitle.textContent = '新会话';
|
||||
setChatTitle('新会话');
|
||||
updateSessionIdBadge();
|
||||
updateCwdBadge();
|
||||
updateReloadMcpButtonUI();
|
||||
@@ -7235,7 +7240,7 @@
|
||||
(snapshot.messages || []).length,
|
||||
);
|
||||
setLastSessionForAgent(snapshot.agent, currentSessionId);
|
||||
chatTitle.textContent = snapshot.title || '新会话';
|
||||
setChatTitle(snapshot.title);
|
||||
updateSessionIdBadge();
|
||||
setCurrentAgent(snapshotAgent);
|
||||
migratePendingNotesToSession(snapshot.sessionId, snapshotAgent);
|
||||
@@ -8554,7 +8559,11 @@
|
||||
reconcileSessionCacheWithSessions();
|
||||
renderSessionList();
|
||||
if (currentSessionId) {
|
||||
setCurrentSessionRunningState(!!getSessionMeta(currentSessionId)?.isRunning);
|
||||
const currentSession = getSessionMeta(currentSessionId);
|
||||
setCurrentSessionRunningState(!!currentSession?.isRunning);
|
||||
if (currentSession && chatTitle.contentEditable !== 'true') {
|
||||
setChatTitle(currentSession.title);
|
||||
}
|
||||
}
|
||||
if (pendingInitialSessionLoad) {
|
||||
pendingInitialSessionLoad = false;
|
||||
@@ -8884,7 +8893,7 @@
|
||||
}
|
||||
});
|
||||
if (msg.sessionId === currentSessionId) {
|
||||
chatTitle.textContent = msg.title;
|
||||
setChatTitle(msg.title);
|
||||
if (msg.titleEvent) {
|
||||
currentOutlineTitleHistory = normalizeOutlineTitleHistory([...currentOutlineTitleHistory, msg.titleEvent]);
|
||||
updateUserOutlinePanel();
|
||||
@@ -12763,7 +12772,7 @@
|
||||
chatTitle.style.overflow = '';
|
||||
chatTitle.style.textOverflow = '';
|
||||
const newTitle = chatTitle.textContent.trim() || originalText;
|
||||
chatTitle.textContent = newTitle;
|
||||
setChatTitle(newTitle);
|
||||
if (save && newTitle !== originalText && currentSessionId) {
|
||||
send({ type: 'rename_session', sessionId: currentSessionId, title: newTitle });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user