eclipsesource / theia-ai-exerciser-labcourse2024

Eclipse Public License 2.0
0 stars 0 forks source link

Implement Pinning Feature in the Chat #19

Open mihaela21k opened 6 days ago

mihaela21k commented 6 days ago

Explanation:

When a specific agent is called in the Theia IDE chat starting with the help of @xyz in the first message in the session, then this agent should be pinned for the subsequent messages in this session, so that there is no need for the user to mention it every time.

If the user wants to call other agent, different from the pinned one, the user can call it via @ABC. This action does not affect the pinning of the first agent for this session and the agent remains pinned.

If an agent @ABC is pinned, a pinning sign would be shown on top of the input widget with a close button, and user can click on the button to unpin the agent.

If in the first message in the chat we don’t call any agent, the chat remains unpinned.

Implementation:

Create a function „Pin-Chat-Session-To-Agent“ with arguments - agent and chat session. Set a flag in the chat session - to be respected by the chat service. This function can then be called by the chat service in the following scenarios:

if the first message in a chat session starts with calling agent via @XYZ

JonasHelming commented 2 days ago

Could you describe this much more in detail how it exactly works? I have sent you a discussion about this.

mihaela21k commented 1 hour ago
flowchart TD
    A["Start Chat Session"] -- First Message Starts with @xyz --> B["Pin to @xyz"]
    A -- First Message Does Not Mention Agent --> C["Unpinned Session"]
    B --> D["Subsequent Messages Sent to @xyz Automatically"]
    D -- Mention @abc --> F["User Mentions Other Agent - e.g., @abc"]
    F -- Does Not Affect Pinning --> D
    D --> UI["User Unpins Agent via Close Button"]
    UI --> C