-
Notifications
You must be signed in to change notification settings - Fork 779
Give Agents access to Terminal output #1032
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
Open
maskdotdev
wants to merge
7
commits into
pingdotgg:main
Choose a base branch
from
maskdotdev:feat/terminal-context
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,104
−82
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c875b6f
Add terminal context selections to chat
maskdotdev aab9382
Fix terminal add-to-chat click handling
maskdotdev 8e7031c
Fix terminal context chat timeline regressions
maskdotdev 17bc503
Refactor terminal context message display state
maskdotdev 9822e65
Fix terminal context review feedback
maskdotdev 1bee2ab
Render terminal contexts inline in chat timeline
maskdotdev b708f38
Merge branch 'main' into feat/terminal-context
maskdotdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
apps/web/src/components/chat/ComposerPendingTerminalContexts.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| import { TerminalIcon, XIcon } from "lucide-react"; | ||
|
|
||
| import { type TerminalContextDraft, formatTerminalContextLabel } from "~/lib/terminalContext"; | ||
| import { Button } from "../ui/button"; | ||
| import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; | ||
|
|
||
| interface ComposerPendingTerminalContextsProps { | ||
| contexts: ReadonlyArray<TerminalContextDraft>; | ||
| onRemove: (contextId: string) => void; | ||
| } | ||
|
|
||
| export function ComposerPendingTerminalContexts(props: ComposerPendingTerminalContextsProps) { | ||
| const { contexts, onRemove } = props; | ||
|
|
||
| if (contexts.length === 0) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <div className="mb-3 flex flex-wrap gap-2"> | ||
| {contexts.map((context) => { | ||
| const label = formatTerminalContextLabel(context); | ||
| return ( | ||
| <Tooltip key={context.id}> | ||
| <TooltipTrigger | ||
| render={ | ||
| <div className="inline-flex max-w-full items-center gap-2 rounded-full border border-border/75 bg-background/80 px-3 py-1.5 text-xs text-foreground shadow-xs"> | ||
| <span className="inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-accent/70 text-muted-foreground"> | ||
| <TerminalIcon className="size-3" /> | ||
| </span> | ||
| <span className="truncate font-medium">{label}</span> | ||
| <Button | ||
| type="button" | ||
| size="icon-xs" | ||
| variant="ghost" | ||
| className="-mr-1 size-5 rounded-full" | ||
| onClick={() => onRemove(context.id)} | ||
| aria-label={`Remove ${label}`} | ||
| > | ||
| <XIcon className="size-3" /> | ||
| </Button> | ||
| </div> | ||
| } | ||
| /> | ||
| <TooltipPopup side="top" className="max-w-80 whitespace-pre-wrap leading-tight"> | ||
| {context.text} | ||
| </TooltipPopup> | ||
| </Tooltip> | ||
| ); | ||
| })} | ||
| </div> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.