feat: complete Codex App capabilities and rebuild release
This commit is contained in:
@@ -587,13 +587,14 @@
|
||||
|
||||
function updateGenerationControls() {
|
||||
const noteActive = !!noteMode;
|
||||
const runtimeBusy = isGenerating || currentSessionRunning;
|
||||
const allowRuntimeInsert = isGenerating && isCodexAppAgent(currentAgent) && !noteActive;
|
||||
const sendLabel = noteActive ? '记录笔记' : (allowRuntimeInsert ? '插入' : '发送');
|
||||
if (sendBtn) {
|
||||
sendBtn.classList.toggle('note-send', noteActive);
|
||||
sendBtn.title = sendLabel;
|
||||
sendBtn.setAttribute('aria-label', sendLabel);
|
||||
sendBtn.hidden = isGenerating ? !(noteActive || allowRuntimeInsert) : false;
|
||||
sendBtn.hidden = runtimeBusy ? !(noteActive || allowRuntimeInsert) : false;
|
||||
}
|
||||
if (queueSendBtn) {
|
||||
const queueAvailable = noteActive && supportsQueuedSend();
|
||||
@@ -604,7 +605,7 @@
|
||||
queueSendBtn.setAttribute('aria-label', queueLabel);
|
||||
}
|
||||
if (abortBtn) {
|
||||
abortBtn.hidden = !isGenerating;
|
||||
abortBtn.hidden = !runtimeBusy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5829,6 +5830,7 @@
|
||||
}
|
||||
}
|
||||
updateCwdBadge();
|
||||
updateGenerationControls();
|
||||
if (!running) scheduleQueuedMessageDrain();
|
||||
}
|
||||
|
||||
@@ -7311,11 +7313,11 @@
|
||||
case 'done':
|
||||
if (!isCurrentSessionEvent(msg)) {
|
||||
if (msg.sessionId) {
|
||||
updateCachedSession(msg.sessionId, (snapshot) => { snapshot.isRunning = false; });
|
||||
updateCachedSession(msg.sessionId, (snapshot) => { snapshot.isRunning = msg.goalActive === true; });
|
||||
}
|
||||
break;
|
||||
}
|
||||
finishGenerating(msg.sessionId);
|
||||
finishGenerating(msg.sessionId, { keepRunning: msg.goalActive === true });
|
||||
break;
|
||||
|
||||
case 'system_message':
|
||||
@@ -7610,8 +7612,9 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
function finishGenerating(sessionId) {
|
||||
function finishGenerating(sessionId, options = {}) {
|
||||
if (sessionId && currentSessionId && sessionId !== currentSessionId) return;
|
||||
const keepRunning = options.keepRunning === true;
|
||||
const hasPersistedAssistantMessage = !!(
|
||||
pendingText
|
||||
|| (Array.isArray(window.pendingContentBlocks) && window.pendingContentBlocks.length > 0)
|
||||
@@ -7619,7 +7622,7 @@
|
||||
isGenerating = false;
|
||||
generatingSessionId = null;
|
||||
updateNoteModeUI();
|
||||
setCurrentSessionRunningState(false);
|
||||
setCurrentSessionRunningState(keepRunning);
|
||||
msgInput.focus();
|
||||
|
||||
if (pendingText || (window.pendingContentBlocks && window.pendingContentBlocks.length > 0)) {
|
||||
@@ -11207,6 +11210,7 @@
|
||||
|
||||
const runtimeInsert = isGenerating && isCodexAppAgent(currentAgent);
|
||||
if ((!text && pendingAttachments.length === 0) || isBlockingSessionLoad()) return;
|
||||
if (currentSessionRunning && !isGenerating) return;
|
||||
if (isGenerating && !runtimeInsert) return;
|
||||
hideCmdMenu();
|
||||
hideOptionPicker();
|
||||
@@ -12031,6 +12035,19 @@
|
||||
</div>
|
||||
<div id="codex-profile-area"></div>
|
||||
|
||||
<label class="settings-toggle-row">
|
||||
<span class="settings-toggle-copy">
|
||||
<span class="settings-toggle-title">Web Search</span>
|
||||
<span class="settings-toggle-meta">仅作用于当前 Codex App 会话的原生联网搜索。</span>
|
||||
</span>
|
||||
<span class="settings-switch">
|
||||
<input type="checkbox" id="codex-enable-search">
|
||||
<span class="settings-switch-track" aria-hidden="true">
|
||||
<span class="settings-switch-thumb"></span>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="settings-divider"></div>
|
||||
<div class="settings-section-title">容量失败重试</div>
|
||||
<div class="settings-field">
|
||||
@@ -12087,6 +12104,7 @@
|
||||
const closeBtn = panel.querySelector('.settings-close');
|
||||
const codexModeSelect = panel.querySelector('#codex-mode');
|
||||
const codexProfileArea = panel.querySelector('#codex-profile-area');
|
||||
const codexSearchToggle = panel.querySelector('#codex-enable-search');
|
||||
const codexRetryModeSelect = panel.querySelector('#codex-retry-mode');
|
||||
const codexRetryIntervalInput = panel.querySelector('#codex-retry-interval');
|
||||
const codexRetryAttemptsInput = panel.querySelector('#codex-retry-attempts');
|
||||
@@ -12302,6 +12320,8 @@
|
||||
codexModeSelect.value = currentCodexConfig.mode || 'local';
|
||||
codexEditingProfiles = (currentCodexConfig.profiles || []).map((profile) => ({ ...profile }));
|
||||
codexActiveProfile = currentCodexConfig.activeProfile || (codexEditingProfiles[0]?.name || '');
|
||||
codexSearchToggle.checked = !!currentCodexConfig.enableSearch;
|
||||
codexSearchToggle.disabled = currentCodexConfig.supportsSearch === false;
|
||||
setCodexRetryConfig(currentCodexConfig.retry || codexRetryConfig);
|
||||
renderCodexProfileArea();
|
||||
};
|
||||
@@ -12319,7 +12339,7 @@
|
||||
mode: codexModeSelect.value,
|
||||
activeProfile: codexActiveProfile,
|
||||
profiles: codexEditingProfiles,
|
||||
enableSearch: false,
|
||||
enableSearch: !!codexSearchToggle.checked,
|
||||
retry: readCodexRetryConfig(),
|
||||
};
|
||||
send({ type: 'save_codex_config', config });
|
||||
|
||||
Reference in New Issue
Block a user