chore: rebuild CentOS 7 release package
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
const PROJECT_COLLAPSE_STORAGE_KEY = 'cc-web-collapsed-projects';
|
||||
const SIDEBAR_COLLAPSE_STORAGE_KEY = 'cc-web-sidebar-collapsed';
|
||||
const SIDEBAR_DRAWER_MEDIA_QUERY = '(max-width: 768px)';
|
||||
const SIDEBAR_DESKTOP_COLLAPSE_MEDIA_QUERY = '(width > 768px) and (hover: hover) and (pointer: fine)';
|
||||
const SIDEBAR_DESKTOP_COLLAPSE_MEDIA_QUERY = '(width > 768px)';
|
||||
const SIDEBAR_HOVER_PREVIEW_MEDIA_QUERY = '(width > 768px) and (hover: hover) and (pointer: fine)';
|
||||
const CROSS_CONVERSATION_REPLY_COLLAPSE_STORAGE_KEY = 'cc-web-collapsed-cross-replies';
|
||||
const CROSS_CONVERSATION_REPLY_COLLAPSE_LIMIT = 500;
|
||||
const ASSISTANT_LAST_SECTION_BUTTON_CLASS = 'msg-last-section-btn';
|
||||
@@ -65,6 +66,13 @@
|
||||
return SLASH_COMMANDS.some((item) => item.cmd.toLowerCase() === normalized);
|
||||
}
|
||||
|
||||
function isGoalSetCommandText(text) {
|
||||
const match = /^\s*\/goal(?:\s+([\s\S]*))?$/i.exec(String(text || ''));
|
||||
if (!match) return false;
|
||||
const rest = String(match[1] || '').trim().toLowerCase();
|
||||
return !!rest && !['clear', 'pause', 'resume'].includes(rest);
|
||||
}
|
||||
|
||||
const MODE_LABELS = {
|
||||
default: '默认',
|
||||
plan: 'Plan',
|
||||
@@ -345,6 +353,7 @@
|
||||
const mobileInputMedia = window.matchMedia('(max-width: 768px), (pointer: coarse)');
|
||||
const sidebarDrawerMedia = window.matchMedia(SIDEBAR_DRAWER_MEDIA_QUERY);
|
||||
const sidebarDesktopCollapseMedia = window.matchMedia(SIDEBAR_DESKTOP_COLLAPSE_MEDIA_QUERY);
|
||||
const sidebarHoverPreviewMedia = window.matchMedia(SIDEBAR_HOVER_PREVIEW_MEDIA_QUERY);
|
||||
const chatMain = document.querySelector('.chat-main');
|
||||
const newChatSplit = sidebar.querySelector('.new-chat-split');
|
||||
const newChatBtn = $('#new-chat-btn');
|
||||
@@ -11247,8 +11256,17 @@
|
||||
return;
|
||||
}
|
||||
const requestId = createLocalId('slash');
|
||||
const clientMessageId = isGoalSetCommandText(text) ? createLocalId('user') : '';
|
||||
rememberPendingSlashDraft(requestId, text, currentSessionId, currentAgent);
|
||||
send({ type: 'message', text, sessionId: currentSessionId, mode: currentMode, agent: currentAgent, requestId });
|
||||
send({
|
||||
type: 'message',
|
||||
text,
|
||||
sessionId: currentSessionId,
|
||||
mode: currentMode,
|
||||
agent: currentAgent,
|
||||
requestId,
|
||||
...(clientMessageId ? { clientMessageId } : {}),
|
||||
});
|
||||
msgInput.value = '';
|
||||
autoResize();
|
||||
return;
|
||||
@@ -11310,7 +11328,7 @@
|
||||
});
|
||||
|
||||
sidebarOverlay.addEventListener('click', closeSidebar);
|
||||
[sidebarDrawerMedia, sidebarDesktopCollapseMedia].forEach((media) => {
|
||||
[sidebarDrawerMedia, sidebarDesktopCollapseMedia, sidebarHoverPreviewMedia].forEach((media) => {
|
||||
if (typeof media.addEventListener === 'function') {
|
||||
media.addEventListener('change', handleSidebarInputModeChange);
|
||||
} else if (typeof media.addListener === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user