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

Create initial version of terminal command agent #115

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

planger
Copy link

@planger planger commented Jul 30, 2024

What it does

Adds an initial simple version of a terminal command agent.

Screencast.from.07-30-2024.11.39.03.AM.webm

https://github.com/eclipsesource/osweek-2024/issues/14

How to test

Open a terminal and right-click to select "Start AI Chat" or hit Ctrl-i.

Follow-ups

  • UX: Allow to switch to alternative commands e.g. clicking Alt-left/Alt-right
  • UX: Add a close icon to the overlay
  • Architecture: Consider harmonizing UI with Chat UI

eclipsesource/osweek-2024#14

Change-Id: Ie6f531bd18a267d60959cc969f01102e2bf3e2db
@cdamus cdamus self-requested a review July 30, 2024 09:46
Change-Id: I7d1b60047d0b3ff5fef6d5aa618ada0da96acc99
Copy link
Collaborator

@cdamus cdamus left a comment

Choose a reason for hiding this comment

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

Great work, Philip! Works a treat.

I just have a couple of nits to ask about, for your consideration.

Also, it appears you have already completed the first two follow-ups ;-)


const lms = await this.languageModelRegistry.selectLanguageModels(this.languageModelRequirements[0]);
if (lms.length === 0) {
console.error('No language model available for the AI Terminal Agent.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we prefer the logger or the message service?


const lm = lms[0];

const systemPrompt = this.promptService.getPrompt('ai-terminal:system-prompt', input)!;
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do we know that we'll get a defined result from the prompt service?

Change-Id: I8544ed38a02e37c5d9de940ed808c5da7d0aa03e
@planger
Copy link
Author

planger commented Jul 30, 2024

Thank you very much for your review! I've addressed your comments.

@planger planger merged commit 3ca368d into feat/ai-chat Jul 30, 2024
1 check passed
@planger planger deleted the feat/ai-chat-terminal branch July 30, 2024 10:26
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

Successfully merging this pull request may close these issues.

2 participants