minor ui fixes and default model to claude

This commit is contained in:
Arjun 2026-06-19 16:24:29 +05:30
parent dfd4075e0e
commit aa8dfb74ad
2 changed files with 46 additions and 33 deletions

View file

@ -44,6 +44,11 @@ const POLICY_LABEL: Record<ApprovalPolicy, string> = {
'auto-approve-reads': 'Auto-approve reads', 'auto-approve-reads': 'Auto-approve reads',
yolo: 'Auto-approve everything', yolo: 'Auto-approve everything',
} }
const POLICY_HEADER_LABEL: Record<ApprovalPolicy, string> = {
ask: 'Ask',
'auto-approve-reads': 'Auto reads',
yolo: 'Auto all',
}
export interface ActiveCodeSession { export interface ActiveCodeSession {
session: CodeSession session: CodeSession
@ -180,45 +185,53 @@ export function CodeView({
<div className="flex min-w-0 flex-1 flex-col"> <div className="flex min-w-0 flex-1 flex-col">
{selectedSession ? ( {selectedSession ? (
<> <>
<div className="flex items-center gap-3 border-b px-4 py-2"> <div className="flex flex-wrap items-start gap-x-3 gap-y-2 border-b px-4 py-2.5">
<div className="min-w-0 flex-1"> <div className="min-w-64 flex-[1_1_360px]">
<div className="truncate text-sm font-medium">{selectedSession.title}</div> <div className="truncate text-sm font-medium">{selectedSession.title}</div>
<div className="flex items-center gap-2 text-[11px] text-muted-foreground"> <div className="mt-1 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-muted-foreground">
<span>{AGENT_LABEL[selectedSession.agent]}</span> <span className="shrink-0 whitespace-nowrap">{AGENT_LABEL[selectedSession.agent]}</span>
<span>·</span> <span className="shrink-0 text-muted-foreground/50">·</span>
<span className="truncate font-mono" title={selectedSession.cwd}>{selectedSession.cwd}</span> <span className="min-w-0 max-w-full flex-1 truncate font-mono" title={selectedSession.cwd}>{selectedSession.cwd}</span>
{selectedSession.worktree && !selectedSession.worktree.removedAt && ( {selectedSession.worktree && !selectedSession.worktree.removedAt && (
<span className="flex shrink-0 items-center gap-1 rounded-full bg-muted px-1.5 py-0.5"> <span className="flex min-w-0 max-w-72 shrink items-center gap-1 rounded-full bg-muted px-1.5 py-0.5">
<GitBranch className="size-3" /> <GitBranch className="size-3" />
{selectedSession.worktree.branch} <span className="truncate">{selectedSession.worktree.branch}</span>
</span> </span>
)} )}
</div> </div>
</div> </div>
<DropdownMenu> <div className="ml-auto flex shrink-0 flex-wrap items-center justify-end gap-2">
<DropdownMenuTrigger asChild> <DropdownMenu>
<Button variant="ghost" size="sm" className="h-7 px-2 text-xs text-muted-foreground"> <DropdownMenuTrigger asChild>
{POLICY_LABEL[selectedSession.policy]} <Button
</Button> variant="ghost"
</DropdownMenuTrigger> size="sm"
<DropdownMenuContent align="end"> className="h-7 gap-1.5 px-2 text-xs text-muted-foreground"
{(Object.keys(POLICY_LABEL) as ApprovalPolicy[]).map((policy) => ( title={POLICY_LABEL[selectedSession.policy]}
<DropdownMenuItem key={policy} onClick={() => void handleUpdateSession({ policy })}> >
{POLICY_LABEL[policy]} <span className="whitespace-nowrap">{POLICY_HEADER_LABEL[selectedSession.policy]}</span>
{selectedSession.policy === policy && <span className="ml-auto"></span>} <ChevronDown className="size-3" />
</DropdownMenuItem> </Button>
))} </DropdownMenuTrigger>
</DropdownMenuContent> <DropdownMenuContent align="end">
</DropdownMenu> {(Object.keys(POLICY_LABEL) as ApprovalPolicy[]).map((policy) => (
<label className="flex shrink-0 cursor-pointer items-center gap-1.5 text-xs text-muted-foreground"> <DropdownMenuItem key={policy} onClick={() => void handleUpdateSession({ policy })}>
<Bot className="size-3.5" /> {POLICY_LABEL[policy]}
Rowboat drives {selectedSession.policy === policy && <span className="ml-auto"></span>}
<Switch </DropdownMenuItem>
checked={selectedSession.mode === 'rowboat'} ))}
disabled={busy} </DropdownMenuContent>
onCheckedChange={(checked) => void handleUpdateSession({ mode: checked ? 'rowboat' : 'direct' })} </DropdownMenu>
/> <label className="flex shrink-0 cursor-pointer items-center gap-1.5 text-xs text-muted-foreground">
</label> <Bot className="size-3.5" />
<span className="whitespace-nowrap">Rowboat drives</span>
<Switch
checked={selectedSession.mode === 'rowboat'}
disabled={busy}
onCheckedChange={(checked) => void handleUpdateSession({ mode: checked ? 'rowboat' : 'direct' })}
/>
</label>
</div>
</div> </div>
<div className="min-h-0 flex-1"> <div className="min-h-0 flex-1">
<WorkspacePane <WorkspacePane

View file

@ -4,7 +4,7 @@ import { IModelConfigRepo } from "./repo.js";
import { isSignedIn } from "../account/account.js"; import { isSignedIn } from "../account/account.js";
import container from "../di/container.js"; import container from "../di/container.js";
const SIGNED_IN_DEFAULT_MODEL = "gpt-5.4"; const SIGNED_IN_DEFAULT_MODEL = "anthropic/claude-opus-4.7";
const SIGNED_IN_DEFAULT_PROVIDER = "rowboat"; const SIGNED_IN_DEFAULT_PROVIDER = "rowboat";
const SIGNED_IN_KG_MODEL = "google/gemini-3.1-flash-lite"; const SIGNED_IN_KG_MODEL = "google/gemini-3.1-flash-lite";
const SIGNED_IN_LIVE_NOTE_AGENT_MODEL = "google/gemini-3.1-flash-lite"; const SIGNED_IN_LIVE_NOTE_AGENT_MODEL = "google/gemini-3.1-flash-lite";