Open
Conversation
bjones1
requested changes
Apr 15, 2026
Owner
bjones1
left a comment
There was a problem hiding this comment.
When I tested the code, I got a series of errors in the JS console:
log.ts:460 ERR [Extension Host] Error sending capture event: TypeError: fetch failed
at node:internal/deps/undici/undici:14902:13
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async ZQ.globalThis.fetch (file:///c:/Program%20Files/Microsoft%20VS%20Code/41dd792b5e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:632:23860)
at async sendCaptureEvent (c:\Users\bj147\Documents\git\CodeChat_Editor\extensions\VSCode\out\extension.js:768:18)
error @ log.ts:460
error @ log.ts:565
error @ logService.ts:51
cio @ remoteConsoleUtil.ts:58
$logExtensionHostMessage @ mainThreadConsole.ts:38
_doInvokeHandler @ rpcProtocol.ts:458
_invokeHandler @ rpcProtocol.ts:443
_receiveRequest @ rpcProtocol.ts:373
_receiveOneMessage @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
_deliver @ event.ts:1354
fire @ event.ts:1385
fire @ ipc.net.ts:652
(anonymous) @ localProcessExtensionHost.ts:421
console.ts:139 [Extension Host] Error sending capture event: TypeError: fetch failed
at node:internal/deps/undici/undici:14902:13
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async ZQ.globalThis.fetch (file:///c:/Program%20Files/Microsoft%20VS%20Code/41dd792b5e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:632:23860)
at async sendCaptureEvent (c:\Users\bj147\Documents\git\CodeChat_Editor\extensions\VSCode\out\extension.js:768:18) (at console.<anonymous> (file:///c:/Program%20Files/Microsoft%20VS%20Code/41dd792b5e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:632:33642))
I'd like to be able to see what logging events are sent. Here's my thoughts from reading the code:
- As far as I can tell, any edits are examined by
classifyAtPosition()by the VSCode extension. This only seems to distinguish between edits to documents (Markdown, reST, latex) and code. I don't see any way to separate out edits to code vs doc blocks;isInMarkdownCodeFence() - It looks like most of the intelligence in terms of code vs. doc blocks happens in the extension. This would make more sense in the server, since that already separates code and doc blocks. Also, I suspect that changes make in the CodeChat Editor may not come through very cleanly. Instead, inside
processing::codechat_for_web_to_sourceand insideprocessing::source_to_codechat_for_web, you have access to avec<CodeDocBlock>where parsing is done. There are also utils to diff this vec with another, if you wanted to store the results more compactly. - I'd suggest sending data capture messages to the server, which the DB can then act on/intercept. Setting up a side HTTP connection doesn't make sense given the existing connection. Instead, it should be easy to add either
CaptureEventorCaptureEventWireto webserver::EditorMessageContents as a Capture message type. - I see you're logging compiles, debug starts, saves, etc. Great!
- Minor issues:
- There are two copies of capture_config.json -- is only one in needed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.