-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Description
Currently, Smart Suggestion does not provide a way to utilize the output of previously executed commands when generating new command suggestions. This limits its ability to provide context-aware suggestions when working with command outputs that the user wants to further process.
Feature Request
Add the ability for Smart Suggestion to:
- Provide an option to capture the output of a specific command when needed
- Include this captured output as context in the prompt sent to the AI model when the user triggers a suggestion with Ctrl+O
- Generate commands that are aware of and can process the data shown in the previous output
Example Use Case
# User runs a command and explicitly captures its output for smart suggestion
$ smart-capture head -n 5 context.log
2024-05-20T08:15:23.456Z [app-server-01] INFO: {"session":"s-9f4d2e","user":"alice@example.com"...}
2024-05-20T08:16:45.789Z [db-server-03] ERROR: {"operation":"CONNECT","target":"postgres://...}
...
# User then types a request and triggers Smart Suggestion with Ctrl+O
$ # Find all ERROR logs and extract the error_code fieldIn this scenario, Smart Suggestion should:
- Use the previously captured output from the
smart-capturecommand - Let the AI model analyze the format and structure of the data
- Generate an appropriate command based on both the user's request and the captured output
Benefits
This enhancement would significantly improve Smart Suggestion's usefulness in interactive shell sessions, allowing for more intelligent and contextually relevant command suggestions based on specific outputs the user wants to process further.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels