Skip to content

Commit e0397b0

Browse files
committed
Log raw response to a dedicated output channel when no valid response is parsed
- when applying response, and there is nothing to apply, write the unable-to-apply response into output pane 'CWC Apply Response', and focus on it └── apps └── editor ├── package.json └── src ├── commands │ ├── apply-response-command │ │ ├── apply-response-command.ts │ │ ├── index.ts │ │ ├── response-processor │ │ │ └── response-processor.ts │ │ └── utils │ │ └── response-parser │ │ └── response-parser.ts │ └── index.ts ├── extension.ts ├── features │ └── agentic-search │ └── agentic-search.ts ├── i18n │ └── translations │ └── commands │ ├── apply-response-command.ts │ └── index.ts ├── utils │ └── agentic-cli-invocation │ ├── agents │ │ └── index.ts │ ├── index.ts │ ├── invoke-agentic-cli.ts │ └── types.ts └── views └── prompt └── backend └── message-handlers └── handle-invoke-agentic-cli.ts
1 parent 72c4c77 commit e0397b0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎apps/editor/src/commands/apply-response-command/response-processor/response-processor.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ import {
3434
resolve_workspace_root
3535
} from '../utils/workspace'
3636

37+
let _apply_response_output_channel: vscode.OutputChannel | undefined
38+
39+
const get_apply_response_output_channel = () => {
40+
if (!_apply_response_output_channel) {
41+
_apply_response_output_channel =
42+
vscode.window.createOutputChannel('CWC Apply Response')
43+
}
44+
return _apply_response_output_channel
45+
}
46+
3747
export type PreviewData = {
3848
original_states: OriginalFileState[]
3949
response: string
@@ -385,6 +395,12 @@ export const process_response = async (params: {
385395
vscode.window.showWarningMessage(
386396
t('command.apply-response-command.error.no-valid-response')
387397
)
398+
399+
const output_channel = get_apply_response_output_channel()
400+
output_channel.clear()
401+
output_channel.append(params.response)
402+
output_channel.show(true)
403+
388404
return null
389405
}
390406

0 commit comments

Comments
 (0)