v2.2-paseo-providers: Paseo provider stack + v2.2.1 pane-scoped chat fixes
Ship Paseo-equivalent provider snapshot, AgentComposerBar, ACP dispatch rewrite with streaming/persist, permission prompts, and agent commands. Follow-up: pane-scoped chat resolution, CoderMessageList tool timeline, WS user-delta replace, and inference orphan tool_call stripping. Archive openspec v2-2; update CHANGELOG and CURRENT. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
49
apps/web/src/components/PermissionCard.tsx
Normal file
49
apps/web/src/components/PermissionCard.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import { ShieldAlert } from 'lucide-react';
|
||||
import type { PermissionPrompt } from '@/api/types';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
interface Props {
|
||||
prompt: PermissionPrompt;
|
||||
onRespond: (optionId: string | null) => void;
|
||||
busy?: boolean;
|
||||
}
|
||||
|
||||
export function PermissionCard({ prompt, onRespond, busy }: Props) {
|
||||
return (
|
||||
<div className="mx-3 my-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm">
|
||||
<div className="flex items-start gap-2">
|
||||
<ShieldAlert className="size-4 text-amber-600 shrink-0 mt-0.5" />
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="font-medium text-foreground">Permission required</p>
|
||||
{prompt.toolTitle && (
|
||||
<p className="text-xs text-muted-foreground mt-0.5 truncate">{prompt.toolTitle}</p>
|
||||
)}
|
||||
<div className="flex flex-wrap gap-2 mt-2">
|
||||
{prompt.options.map((opt) => (
|
||||
<button
|
||||
key={opt.optionId}
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => onRespond(opt.optionId)}
|
||||
className={cn(
|
||||
'rounded-md border border-input bg-background px-2.5 py-1 text-xs hover:bg-accent',
|
||||
'max-md:min-h-[44px] disabled:opacity-40',
|
||||
)}
|
||||
>
|
||||
{opt.label}
|
||||
</button>
|
||||
))}
|
||||
<button
|
||||
type="button"
|
||||
disabled={busy}
|
||||
onClick={() => onRespond(null)}
|
||||
className="rounded-md border border-destructive/40 px-2.5 py-1 text-xs text-destructive hover:bg-destructive/10 max-md:min-h-[44px] disabled:opacity-40"
|
||||
>
|
||||
Deny
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user