Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate the 'save message' button #843

Open
dustinbyrne opened this issue Jan 23, 2025 · 0 comments
Open

Integrate the 'save message' button #843

dustinbyrne opened this issue Jan 23, 2025 · 0 comments
Assignees

Comments

@dustinbyrne
Copy link
Contributor

Overview

This specification outlines the implementation of the save-message event handler. The save-message event is triggered from the frontend Vue application and contains content, messageId, and threadId. The handler will open a new document containing the provided content and metadata, allowing the user to save the document.

This logic is already implemented in the Visual Studio Code extension and can be found here for reference.

Message handling:
https://github.com/getappmap/vscode-appland/blob/076746891e254ca46a592658641918253d0c81ed/src/webviews/chatSearchWebview.ts#L322-L338

Message forwarding from frontend to backend extension:
https://github.com/getappmap/vscode-appland/blob/076746891e254ca46a592658641918253d0c81ed/web/src/chatSearchView.js#L139-L141

Requirements

  1. Event Handling:

    • The event save-message will be forwarded from the frontend.
    • The event contains the following data:
      • content: The main content to be displayed in the document.
      • messageId: A unique identifier for the message.
      • threadId: A unique identifier for the thread.
  2. Document Creation:

    • A new document should be created with the provided content.
    • Metadata should be appended to the content footer in the form of markdown comments.
  3. Metadata Format:

    • The metadata should be formatted as follows:
      [//]: # (This content was generated by AppMap Navie.)
      [//]: # (messageId: <messageId>)
      [//]: # (threadId: <threadId>)
      
  4. Example:

    • Given the content Hello world, thread id example-thread-id, and message id example-message-id, the document should contain:
      Hello world
      
      [//]: # (This content was generated by AppMap Navie.)
      [//]: # (messageId: example-message-id)
      [//]: # (threadId: example-thread-id)
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants