Conversation
…dd-chat-feature-with-user-input-and-files
There was a problem hiding this comment.
Bug: Chat Participant Registration Before Client Activation
A race condition exists where the chat participant is registered before the language client is activated. The chat participant's handler calls getClient().sendRequest(), which requires an initialized language client. Since registerPomlChatParticipant() is called before activateClient() in extension.ts, attempts to use the chat participant before the language server is ready will fail due to an uninitialized client.
packages/poml-vscode/chat/participant.ts#L32-L33
poml/packages/poml-vscode/chat/participant.ts
Lines 32 to 33 in 0195905
packages/poml-vscode/extension.ts#L48-L49
poml/packages/poml-vscode/extension.ts
Lines 48 to 49 in 0195905
Bug: Uri Handling and Template Resolution Errors
The chat participant has two issues:
- It attempts to call
fsPathonvscode.Urireferences that may not be file URIs (e.g.,http,https), leading to errors. The current filtering only validatesUriinstance type, notfilescheme. - The
chat.pomltemplate file is incorrectly resolved relative tocontext.extensionUri. Thegalleryfolder is at the repository root, making the file inaccessible when the extension is packaged.
packages/poml-vscode/chat/participant.ts#L18-L22
poml/packages/poml-vscode/chat/participant.ts
Lines 18 to 22 in 0195905
Was this report helpful? Give feedback by reacting with 👍 or 👎
Summary
package.jsonTesting
npm run build-webviewnpm run build-clinpm run lintnpm testpython -m pytest python/testshttps://chatgpt.com/codex/tasks/task_e_68637dd13bdc832eabc6c5e7215e8b9b