Fix plan message UI: always show model selector and make proceed with build send message directly

This commit is contained in:
OpenCode Dev
2026-02-10 10:39:40 +00:00
parent 7f8c54bac6
commit 89557cb4ed

View File

@@ -94,9 +94,9 @@ function updateBuildModeUI(modeOverride) {
} }
} }
// Hide provider box (model-select-wrap) for plan messages // Always show model selector above message input for both plan and build modes
if (el.modelSelectWrap) { if (el.modelSelectWrap) {
el.modelSelectWrap.style.display = mode === 'build' ? 'inline-flex' : 'none'; el.modelSelectWrap.style.display = 'inline-flex';
} }
if (typeof window.updateUsageProgressBar === 'function') { if (typeof window.updateUsageProgressBar === 'function') {
@@ -108,19 +108,13 @@ async function proceedWithBuild(planContent) {
if (!planContent) return; if (!planContent) return;
pendingPlanContent = planContent; pendingPlanContent = planContent;
// Show model selector when build confirmation modal opens // Always ensure model selector is visible
// This allows user to choose their model before starting the build
if (el.modelSelectWrap) { if (el.modelSelectWrap) {
el.modelSelectWrap.style.display = 'inline-flex'; el.modelSelectWrap.style.display = 'inline-flex';
} }
if (el.confirmBuildModal) { // Directly execute the build without showing confirmation modal
el.confirmBuildModal.style.display = 'flex'; await executeBuild(planContent);
} else {
// Fallback to confirm if modal not found for some reason
const confirmBuild = confirm("Are you sure you want to proceed with this plan? This will start the build process.");
if (confirmBuild) executeBuild(planContent);
}
} }
async function executeBuild(planContent) { async function executeBuild(planContent) {