Skip to content

Conversation

@Fangoling
Copy link
Contributor

What it does

This PR adds the LastTerminalCommand AI Variable Contribution. It stores the last executed terminal command and its corresponding output.

The last terminal output is extracted by extracting the prompt from the terminal history and collecting lines till the next occurrence of the terminal prompt. This enables accurate extraction of command output pairs from the terminal buffer.

How to test

  1. Open a terminal in Theia
  2. Execute any command, for example: echo hello world
  3. Open the AI Chat view and run the following prompt:
@Universal #lastTerminalCommand Explain this terminal command

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Contributed under the supervision of @JonasHelming as part of the TUM Bachelor Thesis project "Enhancing Terminal Usability in Modern IDEs through AI-Assisted Interaction".

Review checklist

Reminder for reviewers

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Oct 14, 2025
@Fangoling Fangoling changed the title feat: implement last executed terminal command ai variable contribution Add AI variable contribution for last executed terminal command Oct 14, 2025
@Fangoling Fangoling marked this pull request as draft October 14, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

1 participant