Skip to content

Conversation

@ultmaster
Copy link
Contributor

Summary

  • register a new POML chat participant for VS Code
  • integrate registration in extension activation
  • expose chat participant details in package.json

Testing

  • npm run build-webview
  • npm run build-cli
  • npm run lint
  • npm test
  • python -m pytest python/tests

https://chatgpt.com/codex/tasks/task_e_68637dd13bdc832eabc6c5e7215e8b9b

cursor[bot]

This comment was marked as outdated.

@ultmaster ultmaster added the v0.1 label Jul 3, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

};
const response: PreviewResponse = await getClient().sendRequest(PreviewMethodName, params);

packages/poml-vscode/extension.ts#L48-L49

registerPomlChatParticipant(context);

Fix in CursorFix in Web


Bug: Uri Handling and Template Resolution Errors

The chat participant has two issues:

  • It attempts to call fsPath on vscode.Uri references that may not be file URIs (e.g., http, https), leading to errors. The current filtering only validates Uri instance type, not file scheme.
  • The chat.poml template file is incorrectly resolved relative to context.extensionUri. The gallery folder is at the repository root, making the file inaccessible when the extension is packaged.

packages/poml-vscode/chat/participant.ts#L18-L22

const filePath = vscode.Uri.joinPath(context.extensionUri, 'gallery', 'chat.poml');
const pomlContext = {
prompt: request.prompt,
files: files.map(f => f.fsPath),

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@ultmaster ultmaster merged commit e438ef7 into chat-sample Jul 9, 2025
4 checks passed
@ultmaster ultmaster deleted the codex/add-chat-feature-with-user-input-and-files branch August 27, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants