From e7436575a5c0c6fb62ce4f4b916f27bd29979648 Mon Sep 17 00:00:00 2001 From: Andrew Pareles <43356051+andrewpareles@users.noreply.github.com> Date: Sat, 10 May 2025 03:28:39 -0700 Subject: [PATCH] Revert "apply button failure better UX" --- .../browser/react/src/markdown/ApplyBlockHoverButtons.tsx | 7 +------ src/vs/workbench/contrib/void/common/prompt/prompts.ts | 6 ++---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx b/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx index 72d298c2..41b5a649 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx @@ -253,7 +253,6 @@ export const ApplyButtonsHTML = ({ const accessor = useAccessor() const editCodeService = accessor.get('IEditCodeService') const metricsService = accessor.get('IMetricsService') - const notificationService = accessor.get('INotificationService') const settingsState = useSettingsState() const isDisabled = !!isFeatureNameDisabled('Apply', settingsState) || !applyBoxId @@ -272,17 +271,13 @@ export const ApplyButtonsHTML = ({ uri: uri, startBehavior: 'reject-conflicts', }) ?? [] + console.log('setting!!!', newApplyingUri) setApplying(newApplyingUri) - if (!applyDonePromise) { - notificationService.info(`Void Error: We couldn't run Apply here (${uri === 'current' ? 'this Apply block wants to run on the current file, but you might not have a file open' : uri.fsPath}).`) - } - // catch any errors by interrupting the stream applyDonePromise?.catch(e => { const uri = getUriBeingApplied(applyBoxId) if (uri) editCodeService.interruptURIStreaming({ uri: uri }) - notificationService.info(`Void Error: There was a problem running Apply: ${e}.`) }) metricsService.capture('Apply Code', { length: codeStr.length }) // capture the length only diff --git a/src/vs/workbench/contrib/void/common/prompt/prompts.ts b/src/vs/workbench/contrib/void/common/prompt/prompts.ts index ac39ee29..613142b8 100644 --- a/src/vs/workbench/contrib/void/common/prompt/prompts.ts +++ b/src/vs/workbench/contrib/void/common/prompt/prompts.ts @@ -480,13 +480,11 @@ ${directoryStr} } - details.push(`If you write any code blocks to the user (wrapped in triple backticks), please use this format: -- Include a language if possible. Terminal should have the language 'shell'. + if (mode === 'gather' || mode === 'normal') { + details.push(`If you write any code blocks, please use this format: - The first line of the code block must be the FULL PATH of the related file if known (otherwise omit). - The remaining contents of the file should proceed as usual.`) - if (mode === 'gather' || mode === 'normal') { - details.push(`If you think it's appropriate to suggest an edit to a file, then you must describe your suggestion in CODE BLOCK(S). - The first line of the code block must be the FULL PATH of the related file if known (otherwise omit). - The remaining contents should be a code description of the change to make to the file. \