mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 09:57:48 +00:00
refactor: group agent launch, status, and messaging owners (#40313)
* refactor: group agent launch, status, and messaging owners * refactor: consolidate direct owner imports * refactor: import pane ownership directly in status listeners
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -6377,8 +6377,8 @@
|
||||
"src/renderer/src/lib/activate-ai-vault-structured-session-host.test.ts": 589,
|
||||
"src/renderer/src/lib/activate-ai-vault-structured-session-reveal.test.ts": 2099,
|
||||
"src/renderer/src/lib/workspace/tabs/activate-tab-and-focus-pane.test.ts": 54,
|
||||
"src/renderer/src/lib/active-agent-note-send-explicit-target.test.ts": 980,
|
||||
"src/renderer/src/lib/active-agent-note-send-focused-session.test.ts": 536,
|
||||
"src/renderer/src/lib/agent-session/messaging/terminal/active-agent-note-send-explicit-target.test.ts": 980,
|
||||
"src/renderer/src/lib/agent-session/messaging/terminal/active-agent-note-send-focused-session.test.ts": 536,
|
||||
"src/renderer/src/lib/activity-thread-display.test.ts": 134,
|
||||
"src/renderer/src/lib/agent-account-restart-startup.test.ts": 1780,
|
||||
"src/renderer/src/lib/agent-session/launch/background/agent-background-session-launch-host.test.ts": 1910,
|
||||
@@ -6395,10 +6395,10 @@
|
||||
"src/renderer/src/lib/agent-session/launch/pane/agent-launch-tab-main-written.test.ts": 2084,
|
||||
"src/renderer/src/lib/agent-session/launch/pane/agent-launch-tab-publication.test.ts": 1855,
|
||||
"src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.test.ts": 1975,
|
||||
"src/renderer/src/lib/agent-message-send.test.ts": 182,
|
||||
"src/renderer/src/lib/agent-paste-draft-submit-retry.test.ts": 315,
|
||||
"src/renderer/src/lib/agent-paste-draft.test.ts": 445,
|
||||
"src/renderer/src/lib/agent-resume-launch-target.test.ts": 3911,
|
||||
"src/renderer/src/lib/agent-session/messaging/agent-message-send.test.ts": 182,
|
||||
"src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft-submit-retry.test.ts": 315,
|
||||
"src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft.test.ts": 445,
|
||||
"src/renderer/src/lib/agent-session/resume/agent-resume-launch-target.test.ts": 3911,
|
||||
"src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-after-failure.test.ts": 870,
|
||||
"src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-close-race.test.ts": 983,
|
||||
"src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.test.ts": 2521,
|
||||
@@ -6417,10 +6417,10 @@
|
||||
"src/renderer/src/lib/agent-session/structured-agent-session-draft-position-lifetime.test.tsx": 3166,
|
||||
"src/renderer/src/lib/agent-session/structured-agent-session-ordinary-draft.test.tsx": 9907,
|
||||
"src/renderer/src/lib/agent-session/structured-agent-session-provisional-tab.test.ts": 3672,
|
||||
"src/renderer/src/lib/agent-skill-cli-prerequisite.test.ts": 219,
|
||||
"src/renderer/src/lib/agent-startup-delayed-delivery-perf.test.ts": 1708,
|
||||
"src/renderer/src/lib/agent-status-evidence-clock.test.ts": 88,
|
||||
"src/renderer/src/lib/agent-status.test.ts": 172,
|
||||
"src/renderer/src/lib/skills/installation/agent-skill-cli-prerequisite.test.ts": 219,
|
||||
"src/renderer/src/lib/agent-session/launch/startup/agent-startup-delayed-delivery-perf.test.ts": 1708,
|
||||
"src/shared/agent-status/contracts/agent-status-evidence-clock.test.ts": 88,
|
||||
"src/shared/agent-status/title/agent-title-tracker.test.ts": 172,
|
||||
"src/renderer/src/lib/agent-session/resume/history/ai-vault-antigravity-reference-host.test.ts": 678,
|
||||
"src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-command.drop-repin.test.ts": 541,
|
||||
"src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-command.test.ts": 665,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Compare window startup from disk with the Loader round trip. Enumerate each divergence as a known defect or accepted difference with its reason.
|
||||
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import type * as AgentStatusModule from '@/lib/agent-status'
|
||||
import type * as AgentStatusModule from '@/lib/agent-status/aggregation/worktree-agent-status'
|
||||
import type { ExecutionHostId } from '../../../shared/execution-host'
|
||||
import type { WorkspaceSessionState } from '../../../shared/workspace-session/workspace-session-state-types'
|
||||
import { LEGACY_WORKSPACE_LAYOUT_PROFILES } from '../../../shared/workspace-layout/workspace-layout-legacy-profile.test-fixture'
|
||||
@@ -24,7 +24,7 @@ vi.mock('../../../shared/layout-owner-switch', () => ({
|
||||
}
|
||||
}))
|
||||
vi.mock('sonner', () => ({ toast: { info: vi.fn(), success: vi.fn(), error: vi.fn() } }))
|
||||
vi.mock('@/lib/agent-status', async (importOriginal) => {
|
||||
vi.mock('@/lib/agent-status/aggregation/worktree-agent-status', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof AgentStatusModule>()
|
||||
return { ...actual, detectAgentStatusFromTitle: vi.fn().mockReturnValue(null) }
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Fragment, useLayoutEffect, useRef, useState } from 'react'
|
||||
import { Folder, GitBranch } from 'lucide-react'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { formatAgentTypeLabel } from '../../../shared/agent-status/presentation/agent-type-label'
|
||||
import type { ClaudeAccountSwitchPromptSessions } from '@/lib/provider-accounts/claude-account-switch-sessions'
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useContext } from 'react'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { agentTypeToIconAgent } from '../../../shared/agent-status/presentation/agent-type-icon-agent'
|
||||
import { formatAgentTypeLabel } from '../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { formatShortTimeAgo } from '@/lib/short-time-ago'
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import { toast } from 'sonner'
|
||||
import { useAppStore } from '@/store'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { getScreenSubmitModifierLabel } from '@/lib/screen-submit-shortcut'
|
||||
import { resolveProjectCloneUrlPrefill } from '@/lib/project-clone-url-prefill'
|
||||
import { useContextualTour } from '@/components/contextual-tours/use-contextual-tour'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { isExplicitAgentStatusFresh } from '@/lib/pane-agent-evidence'
|
||||
import { AGENT_STATUS_STALE_AFTER_MS } from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import {
|
||||
isAgentStatusFresh,
|
||||
AGENT_STATUS_STALE_AFTER_MS
|
||||
} from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
|
||||
import type {
|
||||
AgentStatusEntry,
|
||||
AgentStatusState,
|
||||
@@ -20,7 +23,7 @@ export function freshActivityLiveAgentState(
|
||||
): ActivityLiveAgentState | null {
|
||||
if (
|
||||
!isActivityHookLiveAgentState(entry.state) ||
|
||||
!isExplicitAgentStatusFresh(entry, now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
!isAgentStatusFresh(entry, now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { MessageSquareText, TerminalSquare } from 'lucide-react'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { EventRepoBadge, ThreadAgentStateIndicator } from './activity-thread-controls'
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Cloud, Copy, FolderGit2, GitBranch, Laptop, LocateFixed, Server } from
|
||||
import { toast } from 'sonner'
|
||||
import { useAppStore } from '@/store'
|
||||
import { RepoBadgeMark } from '@/components/repo/RepoBadgeLabel'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { formatAgentTypeLabel } from '../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { getWorktreeGitIdentityDisplay } from '../../../../shared/worktree/git-identity-display'
|
||||
import { jumpToWorktreeFromSidebar } from '@/lib/workspace/activation/worktree-jump-navigation'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { AgentDotState } from '@/components/AgentStateDot'
|
||||
import { formatAgentTypeLabel } from '../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { getAgentRowPrimaryText } from '../../../../shared/agent-status/presentation/agent-row-primary-text'
|
||||
import { showsAgentToolPreview } from '@/lib/agent-row-tool-preview'
|
||||
import { showsAgentToolPreview } from '@/lib/agent-status/presentation/agent-row-tool-preview'
|
||||
import {
|
||||
agentMainAgentVerdict,
|
||||
agentVerdictDisplayMark
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { Bell, ExternalLink, X } from 'lucide-react'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { formatAgentTypeLabel } from '../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from 'react'
|
||||
|
||||
import { migrationUnsupportedToAgentStatusEntry } from '../../../../shared/migration-unsupported-agent-entry'
|
||||
import { useAppStore } from '@/store'
|
||||
import { createAgentStatusEpochSelector } from '@/lib/agent-status-epoch-selector'
|
||||
import { createAgentStatusEpochSelector } from '@/lib/agent-status/evidence/agent-status-epoch-selector'
|
||||
import type { AppState } from '@/store/types'
|
||||
import type { AgentStatusEntry } from '../../../../shared/agent-status/contracts/agent-status-types'
|
||||
|
||||
|
||||
+2
-2
@@ -29,13 +29,13 @@ import {
|
||||
SelectValue
|
||||
} from '@/components/ui/select'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { getAgentCatalog, getAgentLabel } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog, getAgentLabel } from '@/lib/agent-catalog/agent-catalog'
|
||||
import {
|
||||
buildAgentSessionContinuationPrompt,
|
||||
hasFullAgentSessionContext,
|
||||
type AgentSessionContinuationContextMode,
|
||||
type AgentSessionContinuationRequest
|
||||
} from '@/lib/agent-session-continuation'
|
||||
} from '@/lib/agent-session/context/agent-session-continuation'
|
||||
import { launchAgentSessionContinuation } from '@/lib/agent-session/launch/continuation/launch-agent-session-continuation'
|
||||
import { useAppStore } from '@/store'
|
||||
import { isTuiAgentEnabled } from '../../../../shared/agent-launch/catalog/tui-agent-selection'
|
||||
|
||||
@@ -4,12 +4,13 @@ import { Button } from '@/components/ui/button'
|
||||
import { Command, CommandEmpty, CommandInput, CommandList } from '@/components/ui/command'
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { AgentIcon, type AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import {
|
||||
agentPickerBlankTerminalMatches,
|
||||
getAgentPickerCommandValue,
|
||||
searchAgentPickerEntries
|
||||
} from '@/lib/agent-picker-search'
|
||||
} from '@/lib/agent-catalog/agent-picker-search'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import * as state from './agent-combobox-command-state'
|
||||
|
||||
@@ -21,7 +21,8 @@ import {
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { AgentIcon, getAgentLabel } from '@/lib/agent-catalog'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { rowLabel } from '../tab-bar/tab-agent-row-presentation'
|
||||
import type { NewTabAgentMenuModel } from '../tab-bar/use-new-tab-agent-menu-rows'
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useAppStore } from '@/store/index'
|
||||
import { parseExecutionHostId } from '../../../../shared/execution-host'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Terminal } from 'lucide-react'
|
||||
import { agentPickerBlankTerminalMatches } from '@/lib/agent-picker-search'
|
||||
import { agentPickerBlankTerminalMatches } from '@/lib/agent-catalog/agent-picker-search'
|
||||
import { AgentDefaultContextMenu } from './agent-combobox-items'
|
||||
import { AgentPickerMenuRow, type AgentPickerMenuLaunch } from './AgentLaunchPickerMenuRow'
|
||||
import { DropdownMenuItem } from '@/components/ui/dropdown-menu'
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
DropdownMenuShortcut,
|
||||
useDropdownMenuClose
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { useUiLanguageRevision } from '@/i18n/use-ui-language-revision'
|
||||
import { AgentDefaultContextMenu } from './agent-combobox-items'
|
||||
import { AgentLaunchSetupButton, type AgentPickerSetupIdentity } from './AgentLaunchSetupButton'
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { terminalPendingLabel, terminalPendingReason } from '../tab-bar/new-tab-agent-menu-model'
|
||||
import React, { useState } from 'react'
|
||||
import { CommandItem, CommandSeparator } from '@/components/ui/command'
|
||||
import { AgentIcon, getAgentCatalog, type AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import { searchAgentPickerEntries } from '@/lib/agent-picker-search'
|
||||
import { getAgentCatalog, type AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { searchAgentPickerEntries } from '@/lib/agent-catalog/agent-picker-search'
|
||||
import type { AgentLaunchSurface } from '@/lib/agent-session/launch/routing/agent-session-launch-plan'
|
||||
import type { NewTabAgentMenuRow } from '../../../../shared/agent-launch/picker/agent-launch-picker-rows'
|
||||
import type { NewTabAgentMenuModel } from '@/components/tab-bar/use-new-tab-agent-menu-rows'
|
||||
@@ -16,7 +17,7 @@ import { cn } from '@/lib/utils'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import type { resolveAgentMenuSelection } from '@/lib/agent-menu-selection'
|
||||
import type { resolveAgentMenuSelection } from '@/lib/agent-session/launch/routing/agent-menu-selection'
|
||||
import { renderAgentComboboxItem } from './agent-combobox-items'
|
||||
import { AgentSurfaceLaunchButton } from './AgentSurfaceLaunchButton'
|
||||
|
||||
|
||||
+2
-28
@@ -1,8 +1,7 @@
|
||||
import type React from 'react'
|
||||
import { getAgentCatalog, getAgentLabel } from '../../../lib/agent-catalog/agent-catalog'
|
||||
import { ClaudeIcon, DroidIcon, OpenAIIcon } from '@/components/status-bar/icons'
|
||||
import type { TuiAgent } from '../../../shared/agent-launch/catalog/tui-agent'
|
||||
import type { TerminalAgent } from '../../../shared/agent-status/identity/terminal-agent'
|
||||
import { formatAgentTypeLabel } from '../../../shared/agent-status/presentation/agent-type-label'
|
||||
import type { TerminalAgent } from '../../../../../shared/agent-status/identity/terminal-agent'
|
||||
import {
|
||||
AgentLetterIcon,
|
||||
AiderIcon,
|
||||
@@ -12,32 +11,7 @@ import {
|
||||
OpenCodeIcon,
|
||||
PiIcon
|
||||
} from './agent-icon-glyphs'
|
||||
import { createLocalizedCatalog } from '@/i18n/localized-catalog'
|
||||
import { AGENT_FAVICON_ASSETS } from './agent-favicon-assets'
|
||||
import { buildAgentCatalogEntries } from './agent-catalog-entries'
|
||||
|
||||
export type AgentCatalogEntry = {
|
||||
id: TuiAgent
|
||||
label: string
|
||||
/** Default CLI binary name used for PATH detection. */
|
||||
cmd: string
|
||||
searchAliases?: readonly string[]
|
||||
/** Direct or bundled image URL for agents whose project identity is not represented by a favicon service. */
|
||||
iconUrl?: string
|
||||
/** Domain for Google's favicon service — used for agents without an SVG icon. */
|
||||
faviconDomain?: string
|
||||
/** Homepage/install docs URL, sourced from the README agent badge list. */
|
||||
homepageUrl: string
|
||||
}
|
||||
|
||||
export const getAgentCatalog = createLocalizedCatalog(buildAgentCatalogEntries)
|
||||
|
||||
// Why: tests and a few legacy call sites still import a catalog snapshot.
|
||||
export const AGENT_CATALOG: AgentCatalogEntry[] = getAgentCatalog()
|
||||
|
||||
export function getAgentLabel(agent: TerminalAgent): string {
|
||||
return getAgentCatalog().find((entry) => entry.id === agent)?.label ?? formatAgentTypeLabel(agent)
|
||||
}
|
||||
|
||||
export function AgentIcon({
|
||||
agent,
|
||||
@@ -0,0 +1,70 @@
|
||||
import qoderUrl from '../../../../../shared/agent-icons/qoder.png?url'
|
||||
import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import grokUrl from '../../../../../shared/agent-icons/grok.png?url'
|
||||
import mimoCodeUrl from '../../../../../shared/agent-icons/mimo-code.png?url'
|
||||
import anteUrl from '../../../../../shared/agent-icons/ante.png?url'
|
||||
import traeUrl from '../../../../../shared/agent-icons/trae.png?url'
|
||||
import primeAgentUrl from '../../../../../shared/agent-icons/prime-agent.png?url'
|
||||
import geminiUrl from '../../../../../shared/agent-icons/gemini.png?url'
|
||||
import antigravityUrl from '../../../../../shared/agent-icons/antigravity.png?url'
|
||||
import gooseUrl from '../../../../../shared/agent-icons/goose.png?url'
|
||||
import ampUrl from '../../../../../shared/agent-icons/amp.png?url'
|
||||
import kiroUrl from '../../../../../shared/agent-icons/kiro.png?url'
|
||||
import crushUrl from '../../../../../shared/agent-icons/crush.png?url'
|
||||
import augUrl from '../../../../../shared/agent-icons/aug.png?url'
|
||||
import autohandUrl from '../../../../../shared/agent-icons/autohand.png?url'
|
||||
import clineUrl from '../../../../../shared/agent-icons/cline.png?url'
|
||||
import freebuffUrl from '../../../../../shared/agent-icons/freebuff.png?url'
|
||||
import codebuffUrl from '../../../../../shared/agent-icons/codebuff.png?url'
|
||||
import commandCodeUrl from '../../../../../shared/agent-icons/command-code.png?url'
|
||||
import continueUrl from '../../../../../shared/agent-icons/continue.png?url'
|
||||
import cursorUrl from '../../../../../shared/agent-icons/cursor.png?url'
|
||||
import kimiUrl from '../../../../../shared/agent-icons/kimi.png?url'
|
||||
import mistralVibeUrl from '../../../../../shared/agent-icons/mistral-vibe.png?url'
|
||||
import qwenCodeUrl from '../../../../../shared/agent-icons/qwen-code.png?url'
|
||||
import rovoUrl from '../../../../../shared/agent-icons/rovo.png?url'
|
||||
import hermesUrl from '../../../../../shared/agent-icons/hermes.png?url'
|
||||
import devinUrl from '../../../../../shared/agent-icons/devin.png?url'
|
||||
import museUrl from '../../../../../shared/agent-icons/muse.png?url'
|
||||
import zcodeUrl from '../../../../../shared/agent-icons/zcode.png?url'
|
||||
import openclawUrl from '../../../../../shared/agent-icons/openclaw.png?url'
|
||||
import dshUrl from '../../../../../shared/agent-icons/dsh.png?url'
|
||||
import jcodeUrl from '../../../../../shared/agent-icons/jcode.png?url'
|
||||
import codebuddyUrl from '../../../../../shared/agent-icons/codebuddy.png?url'
|
||||
|
||||
// Bundle favicons for offline/Google-blocked regions (#8451); shared/agent-icons also supplies mobile-agent-icon-assets.ts.
|
||||
export const AGENT_FAVICON_ASSETS: Partial<Record<TuiAgent, string>> = {
|
||||
grok: grokUrl,
|
||||
'mimo-code': mimoCodeUrl,
|
||||
ante: anteUrl,
|
||||
trae: traeUrl,
|
||||
'prime-agent': primeAgentUrl,
|
||||
qoder: qoderUrl,
|
||||
'qoder-cn': qoderUrl,
|
||||
gemini: geminiUrl,
|
||||
antigravity: antigravityUrl,
|
||||
goose: gooseUrl,
|
||||
amp: ampUrl,
|
||||
kiro: kiroUrl,
|
||||
crush: crushUrl,
|
||||
aug: augUrl,
|
||||
autohand: autohandUrl,
|
||||
cline: clineUrl,
|
||||
codebuff: codebuffUrl,
|
||||
freebuff: freebuffUrl,
|
||||
'command-code': commandCodeUrl,
|
||||
continue: continueUrl,
|
||||
cursor: cursorUrl,
|
||||
kimi: kimiUrl,
|
||||
'mistral-vibe': mistralVibeUrl,
|
||||
'qwen-code': qwenCodeUrl,
|
||||
rovo: rovoUrl,
|
||||
hermes: hermesUrl,
|
||||
devin: devinUrl,
|
||||
muse: museUrl,
|
||||
dsh: dshUrl,
|
||||
zcode: zcodeUrl,
|
||||
openclaw: openclawUrl,
|
||||
jcode: jcodeUrl,
|
||||
codebuddy: codebuddyUrl
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { cn } from './utils'
|
||||
import { cn } from '../../../lib/utils'
|
||||
|
||||
export function PiIcon({
|
||||
size = 14,
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import type React from 'react'
|
||||
import type { AgentType } from '../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { AgentIcon } from './agent-catalog'
|
||||
import type { AgentType } from '../../../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { AgentIcon } from './AgentIcon'
|
||||
import { AgentLetterIcon } from './agent-icon-glyphs'
|
||||
import { agentTypeToIconAgent } from '../../../shared/agent-status/presentation/agent-type-icon-agent'
|
||||
import { agentTypeToIconAgent } from '../../../../../shared/agent-status/presentation/agent-type-icon-agent'
|
||||
|
||||
/** Status-row icon: known agents get their brand icon, any other OSC 7501 program its first letter. */
|
||||
export function AgentTypeIcon({
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import { composeActiveTerminalTheme } from '@/components/terminal-pane/appearance/terminal-appearance'
|
||||
import { useSystemPrefersDark } from '@/hooks/theme/use-system-prefers-dark'
|
||||
import { useIntlLocale, useTranslate } from '@/i18n/use-translate'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { buildFontFamily } from '@/lib/monospace-font-family'
|
||||
import { resolveEffectiveTerminalAppearance } from '@/lib/terminal-theme'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
resolveHostCapabilities,
|
||||
type ProspectiveWorkspace
|
||||
} from '@/lib/agent-session/launch/routing/agent-launch-route-input'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { parseExecutionHostId } from '../../../../shared/execution-host'
|
||||
import { AUTOMATION_LAUNCH_SETUP_RUNTIME_CAPABILITY } from '../../../../shared/automations/automation-runtime-capabilities'
|
||||
import { automationLegacyArguments } from '../../../../shared/automations/launch/automation-legacy-arguments'
|
||||
|
||||
@@ -3,7 +3,8 @@ import { Pencil, Pause, Play, Trash2 } from 'lucide-react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { getAgentCatalog, AgentIcon } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import type { Automation } from '../../../../shared/automations/automation-definition'
|
||||
import type { AutomationRun } from '../../../../shared/automations/history/automation-run'
|
||||
import { formatUiAutomationSchedule } from './automation-schedule-label'
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
automationLaunchWorkspace
|
||||
} from './automation-launch-surface'
|
||||
import { Dialog, DialogContent } from '@/components/ui/dialog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { filterEnabledTuiAgents } from '../../../../shared/agent-launch/catalog/tui-agent-selection'
|
||||
import type {
|
||||
AutomationLaunchPreferences,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'
|
||||
import { useState } from 'react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { AGENT_CATALOG } from '@/lib/agent-catalog'
|
||||
import { AGENT_CATALOG } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { TooltipProvider } from '@/components/ui/tooltip'
|
||||
import { useAppStore } from '@/store'
|
||||
import { createCompatibleRuntimeStatusResponse } from '@/runtime/rpc/testing/runtime-compatibility-test-fixture'
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { OrcaHooks } from '../../../../shared/orca-yaml-hook-types'
|
||||
import type { ProjectHostSetup } from '../../../../shared/project-types'
|
||||
import type { Repo } from '../../../../shared/repo-types'
|
||||
import type { Worktree } from '../../../../shared/worktree/types'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AUTOMATION_EDITOR_SECTION_LABEL_CLASS, Field } from './automation-page-parts'
|
||||
import { AutomationMissedRunGraceField } from './AutomationMissedRunGraceField'
|
||||
import { AutomationPrecheckFields } from './AutomationPrecheckFields'
|
||||
|
||||
@@ -16,8 +16,9 @@ import {
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { AgentIcon, getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { searchAgentPickerEntries } from '@/lib/agent-picker-search'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { searchAgentPickerEntries } from '@/lib/agent-catalog/agent-picker-search'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { useBoundedHostRows } from '@/components/host-picker/use-bounded-host-rows'
|
||||
import { HostListSearchField } from '@/components/host-picker/HostListSearchField'
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { AutomationRun } from '../../../../shared/automations/history/automation-run'
|
||||
import { getAutomationRunRepoId } from '../../../../shared/automations/history/automation-run-identity'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { buildAutomationRrule } from '../../../../shared/automations/scheduling/automation-schedule-occurrences'
|
||||
import { automationLaunchInputs } from '../../../../shared/automations/launch/automation-launch-choices'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import type { AutomationPrecheck } from '../../../../shared/automations/automation-definition'
|
||||
import type { Worktree } from '../../../../shared/worktree/types'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import { shallow } from 'zustand/shallow'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import type {
|
||||
AgentLaunchRouteStore,
|
||||
ProspectiveWorkspace
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
} from '../../../../shared/agent-launch/catalog/tui-agent-selection'
|
||||
import type { Repo } from '../../../../shared/repo-types'
|
||||
import type { Worktree } from '../../../../shared/worktree/types'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { useAppStore } from '@/store'
|
||||
import { useRepoMap } from '@/store/repos/use-repository-catalog'
|
||||
import { useWorktreeMap } from '@/store/slices/worktrees/listing/use-worktree-catalog'
|
||||
|
||||
@@ -11,7 +11,10 @@ import {
|
||||
buildExplicitEntriesByTabId,
|
||||
type TabPaneInputSources
|
||||
} from '../../../../shared/sidebar-list/smart-attention'
|
||||
import { isExplicitAgentStatusFresh } from '@/lib/pane-agent-evidence'
|
||||
import {
|
||||
isAgentStatusFresh,
|
||||
AGENT_STATUS_STALE_AFTER_MS
|
||||
} from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import {
|
||||
getLiveAgentStatusByWorktreeId,
|
||||
type LiveAgentWorktreeStatus
|
||||
@@ -32,7 +35,6 @@ import {
|
||||
} from '@/components/tab-bar/terminal-tab-activity-status'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
|
||||
import { AGENT_STATUS_STALE_AFTER_MS } from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import type { AgentStatusEntry } from '../../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { parsePaneKey } from '../../../../shared/workspace-layout/stable-pane-id'
|
||||
import type { BrowserWorkspace } from '../../../../shared/browser-workspace-types'
|
||||
@@ -162,7 +164,7 @@ function buildLiveAgentStatusPaneIdsByTabId(
|
||||
}
|
||||
if (
|
||||
entry.restoredUnconfirmed !== true &&
|
||||
!isExplicitAgentStatusFresh(entry, now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
!isAgentStatusFresh(entry, now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
) {
|
||||
stalePaneIds.add(paneId)
|
||||
continue
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
GitPullRequestClosed,
|
||||
GitPullRequestDraft
|
||||
} from 'lucide-react'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { AgentQuestionIcon } from '@/components/AgentQuestionIcon'
|
||||
import { AgentStateDot } from '@/components/AgentStateDot'
|
||||
import { RepoIconGlyph } from '@/components/repo/repo-icon'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useId, useRef } from 'react'
|
||||
import { SquareArrowOutUpRight, XIcon } from 'lucide-react'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { formatAgentTypeLabel } from '../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { agentStateLabel } from '@/components/AgentStateDot'
|
||||
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog'
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import React, { useState, useCallback } from 'react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { opensClaudeParentConversation, viewClaudeAgentFromRow } from '@/lib/claude-agent-row-view'
|
||||
import {
|
||||
opensClaudeParentConversation,
|
||||
viewClaudeAgentFromRow
|
||||
} from '@/lib/agent-session/navigation/claude-agent-row-view'
|
||||
import { useClaudeAgentRowView } from './use-claude-agent-row-view'
|
||||
import {
|
||||
AgentStateDot,
|
||||
@@ -8,26 +11,32 @@ import {
|
||||
agentStateProgressLabel,
|
||||
type AgentDotState
|
||||
} from '@/components/AgentStateDot'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { formatAgentTypeLabel } from '../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { DashboardAgentRowMessage } from './DashboardAgentRowMessage'
|
||||
import { DashboardAgentRowTrailingControls } from './DashboardAgentRowTrailingControls'
|
||||
import { DashboardAgentRowToolStep } from './DashboardAgentRowToolStep'
|
||||
import { programStatusAttentionLine } from '../../../../shared/program-status/presentation'
|
||||
import { agentRowToolInput, showsAgentToolPreview } from '@/lib/agent-row-tool-preview'
|
||||
import {
|
||||
agentRowToolInput,
|
||||
showsAgentToolPreview
|
||||
} from '@/lib/agent-status/presentation/agent-row-tool-preview'
|
||||
import { resolveRowProgramStatus } from '@/lib/program-status/agent-row-presentation'
|
||||
import { agentRowStoppingLabel } from '@/lib/agent-row-stopping-label'
|
||||
import { agentRowStoppingLabel } from '@/lib/agent-status/presentation/agent-row-stopping-label'
|
||||
import {
|
||||
agentNoUpdateLabel,
|
||||
formatCompactDuration
|
||||
} from '../../../../shared/agent-status/presentation/agent-row-decay-state'
|
||||
import { agentRowDisplayDotState, agentRowDotState as asDotState } from '@/lib/agent-row-dot-state'
|
||||
import {
|
||||
agentRowDisplayDotState,
|
||||
agentRowDotState as asDotState
|
||||
} from '@/lib/agent-status/presentation/agent-row-dot-state'
|
||||
import {
|
||||
agentMainAgentVerdict,
|
||||
agentVerdictDisplayMark
|
||||
} from '../../../../shared/agent-status/lifecycle/agent-main-agent-verdict'
|
||||
import { agentVerdictStatusLine } from '@/lib/agent-verdict-status-line'
|
||||
import { agentVerdictStatusLine } from '@/lib/agent-status/presentation/agent-verdict-status-line'
|
||||
import type { DashboardAgentRow as DashboardAgentRowData } from './useDashboardData'
|
||||
import { getAgentRowPrimaryText } from '../../../../shared/agent-status/presentation/agent-row-primary-text'
|
||||
import { useAgentRowConversationName } from './use-agent-row-conversation-name'
|
||||
|
||||
@@ -2,7 +2,10 @@ import { agentEntrySessionStartedAt } from '../../../../shared/agent-session/lif
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { useShallow } from 'zustand/react/shallow'
|
||||
import { useAppStore } from '@/store'
|
||||
import { isExplicitAgentStatusFresh } from '@/lib/pane-agent-evidence'
|
||||
import {
|
||||
isAgentStatusFresh,
|
||||
AGENT_STATUS_STALE_AFTER_MS
|
||||
} from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import type { DashboardAgentRow } from './useDashboardData'
|
||||
import type { RetainedAgentEntry } from '@/store/slices/agent-status/agent-status-contract'
|
||||
import type { FolderWorkspace } from '../../../../shared/folder-workspaces/folder-workspace-types'
|
||||
@@ -11,7 +14,7 @@ import type { TerminalTab } from '../../../../shared/workspace-layout/terminal-t
|
||||
import type { Worktree } from '../../../../shared/worktree/types'
|
||||
import { folderWorkspaceKey } from '../../../../shared/workspace-scope'
|
||||
import { resolveAgentPaneAuthorityKey } from '@/store/slices/agent-status/agent-pane-authority'
|
||||
import { AGENT_STATUS_STALE_AFTER_MS } from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
|
||||
import type { AgentStatusEntry } from '../../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { parsePaneKey } from '../../../../shared/workspace-layout/stable-pane-id'
|
||||
import { agentTurnEndedOnPurpose } from '../../../../shared/agent-status/lifecycle/agent-main-agent-verdict'
|
||||
@@ -116,7 +119,7 @@ export function buildRetainedAgentsSyncSnapshot(args: RetainedAgentsSyncSnapshot
|
||||
if (!owner) {
|
||||
continue
|
||||
}
|
||||
const isFresh = isExplicitAgentStatusFresh(entry, args.now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
const isFresh = isAgentStatusFresh(entry, args.now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
const shouldDecay =
|
||||
!isFresh &&
|
||||
(entry.state === 'working' || entry.state === 'blocked' || entry.state === 'waiting')
|
||||
|
||||
+8
-8
@@ -22,24 +22,24 @@ import {
|
||||
} from '@/runtime/native-chat/naming/structured-chat-name-observation'
|
||||
import { QuickLaunchAgentMenuItems } from '@/components/tab-bar/QuickLaunchButton'
|
||||
import { AgentStateDot, agentStateLabel } from '@/components/AgentStateDot'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import {
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { focusTerminalTabSurface } from '@/lib/focus-terminal-tab-surface'
|
||||
import '@/lib/active-agent-note-send'
|
||||
import '@/lib/agent-session/messaging/terminal/active-agent-note-send'
|
||||
import {
|
||||
activeAgentNotesSendFailureMessage,
|
||||
type ActiveAgentNotesSendResult
|
||||
} from '@/lib/active-agent-note-send-result'
|
||||
import { sendMessageToAgent } from '@/lib/agent-message-send'
|
||||
} from '@/lib/agent-session/messaging/terminal/active-agent-note-send-result'
|
||||
import { sendMessageToAgent } from '@/lib/agent-session/messaging/agent-message-send'
|
||||
import {
|
||||
deriveNotesSendAgentTargets,
|
||||
type NotesSendAgentTarget
|
||||
} from '@/lib/notes-send-agent-targets'
|
||||
import { agentKindForAgentType } from '@/lib/agent-status'
|
||||
} from '@/lib/agent-session/messaging/notes-send-agent-targets'
|
||||
import { agentKindForAgentType } from '@/lib/agent-status/aggregation/worktree-agent-status'
|
||||
import { formatAgentTypeLabel } from '../../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { track } from '@/lib/telemetry'
|
||||
import { useNow } from '@/hooks/use-now'
|
||||
@@ -49,10 +49,10 @@ import { useWorktreeAgentRows } from '@/components/sidebar/workspace-card/activi
|
||||
import { useAgentRowConversationName } from '@/components/dashboard/use-agent-row-conversation-name'
|
||||
import { getAgentRowPrimaryText } from '../../../../../shared/agent-status/presentation/agent-row-primary-text'
|
||||
import type { LaunchSource } from '../../../../../shared/telemetry-property-schemas'
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-row-dot-state'
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-status/presentation/agent-row-dot-state'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import { agentSendDisabledReasonLabel } from '@/lib/agent-send-disabled-reason-label'
|
||||
import { agentSendDisabledReasonLabel } from '@/lib/agent-session/messaging/agent-send-disabled-reason-label'
|
||||
import { addQuoteToAgent } from '@/components/native-chat/selection-quotes/native-chat-workspace-selection'
|
||||
import React, { useCallback, useMemo } from 'react'
|
||||
import { orderSendTargetsByWorktreeAgentRows } from './review-notes-send-target-order'
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import type { DashboardAgentRow as DashboardAgentRowData } from '@/components/dashboard/useDashboardData'
|
||||
import type { NotesSendAgentTarget } from '@/lib/notes-send-agent-targets'
|
||||
import type { NotesSendAgentTarget } from '@/lib/agent-session/messaging/notes-send-agent-targets'
|
||||
|
||||
export type OrderedSendTarget = {
|
||||
target: NotesSendAgentTarget
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useAppStore } from '@/store'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import { AgentSkillSetupPanel } from '../skills/setup/AgentSkillSetupPanel'
|
||||
import type { useMobileEmulatorAgentSetupState } from './use-mobile-emulator-agent-setup-state'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useActiveProjectSkillRuntime } from '@/hooks/useActiveProjectSkillRuntime'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import {
|
||||
GLOBAL_AGENT_SKILL_SOURCE_KINDS,
|
||||
useInstalledAgentSkill
|
||||
|
||||
@@ -5,7 +5,7 @@ import { usePrefersReducedMotion } from '@/components/feature-wall/feature-wall-
|
||||
import { nativeChatPermissionModeLabel } from '@/components/native-chat/session/options/controls/native-chat-permission-mode-labels'
|
||||
import { nativeChatToolRowVerb } from '@/components/native-chat/tools/lines/native-chat-tool-line-label'
|
||||
import { useIntlLocale, useTranslate } from '@/i18n/use-translate'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { cn } from '@/lib/utils'
|
||||
import {
|
||||
CHAT_DEMO_FILE,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { CliSkillSetupTerminal } from './CliSkillSetupTerminal'
|
||||
import { AgentSkillSetupPanel } from '@/components/skills/setup/AgentSkillSetupPanel'
|
||||
import { ORCA_CLI_SKILL_NAME, ORCHESTRATION_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import {
|
||||
ORCA_CLI_SKILL_NAME,
|
||||
ORCHESTRATION_SKILL_NAME
|
||||
} from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import { useActiveProjectSkillRuntime } from '@/hooks/useActiveProjectSkillRuntime'
|
||||
import {
|
||||
GLOBAL_AGENT_SKILL_SOURCE_KINDS,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
buildSkillCommandForRuntime,
|
||||
buildSkillSetupTerminalCommand
|
||||
} from '@/lib/skill-runtime-command'
|
||||
import { ORCA_CLI_ORCHESTRATION_SKILL_INSTALL_COMMAND } from '@/lib/agent-feature-install-commands'
|
||||
import { ORCA_CLI_ORCHESTRATION_SKILL_INSTALL_COMMAND } from '@/lib/skills/installation/agent-feature-install-commands'
|
||||
import { useActiveProjectSkillRuntime } from '@/hooks/useActiveProjectSkillRuntime'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
DEFAULT_AI_VAULT_GROUP,
|
||||
DEFAULT_AI_VAULT_HIDE_EMPTY_SESSIONS
|
||||
} from '@/components/right-sidebar/ai-vault/scope/ai-vault-view-defaults'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import type { SessionSearchDemoRow } from './session-search-feature-tip-demo'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
import { bundledSkillSetupActionLabel } from '../skills/setup/bundled-skill-setup-copy'
|
||||
import { useOnboardingSkillRuntime } from '@/hooks/use-onboarding-skill-runtime'
|
||||
import { FeatureSetupInlineTerminal } from '../onboarding/FeatureSetupInlineTerminal'
|
||||
import { buildAgentFeatureSkillInstallCommand } from '@/lib/agent-feature-install-commands'
|
||||
import { buildAgentFeatureSkillInstallCommand } from '@/lib/skills/installation/agent-feature-install-commands'
|
||||
import { buildSkillCommandForRuntime } from '../../lib/skill-runtime-command'
|
||||
import type { OnboardingFeatureSetupRuntimeContext } from '../onboarding/onboarding-feature-setup-runtime'
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { JSX } from 'react'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import { BROWSER_USE_ENABLED_STORAGE_KEY } from '@/lib/browser/browser-use-setup-state'
|
||||
import type { InstalledAgentSkillState } from '@/hooks/useInstalledAgentSkills'
|
||||
import { useActiveProjectSkillRuntime } from '@/hooks/useActiveProjectSkillRuntime'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useBundledSkillInstallAction } from '@/hooks/use-bundled-skill-install-action'
|
||||
import { bundledSkillSetupActionLabel } from '../skills/setup/bundled-skill-setup-copy'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCA_CLI_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import { useOnboardingSkillRuntime } from '@/hooks/use-onboarding-skill-runtime'
|
||||
import { FeatureSetupInlineTerminal } from '../onboarding/FeatureSetupInlineTerminal'
|
||||
import { buildAgentFeatureSkillInstallCommand } from '@/lib/agent-feature-install-commands'
|
||||
import { buildAgentFeatureSkillInstallCommand } from '@/lib/skills/installation/agent-feature-install-commands'
|
||||
import { buildSkillCommandForRuntime } from '../../lib/skill-runtime-command'
|
||||
import type { OnboardingFeatureSetupRuntimeContext } from '../onboarding/onboarding-feature-setup-runtime'
|
||||
import { useCallback, useState } from 'react'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { JSX } from 'react'
|
||||
import { ORCHESTRATION_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCHESTRATION_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import type { InstalledAgentSkillState } from '@/hooks/useInstalledAgentSkills'
|
||||
import { useActiveProjectSkillRuntime } from '@/hooks/useActiveProjectSkillRuntime'
|
||||
import { AgentSkillSetupPanel } from '../skills/setup/AgentSkillSetupPanel'
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
COMPUTER_USE_SKILL_NAME,
|
||||
ORCA_CLI_SKILL_NAME,
|
||||
ORCHESTRATION_SKILL_NAME
|
||||
} from '@/lib/agent-feature-skill-names'
|
||||
} from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import {
|
||||
GLOBAL_AGENT_SKILL_SOURCE_KINDS,
|
||||
useInstalledAgentSkill
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useEffect, useRef, useState } from 'react'
|
||||
import type { JSX, ReactNode } from 'react'
|
||||
import { Wrench } from 'lucide-react'
|
||||
import { AgentStateDot } from '@/components/AgentStateDot'
|
||||
import { getAgentCatalog, AgentIcon, type AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog, type AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { ClaudeIcon, OpenAIIcon } from '../../status-bar/icons'
|
||||
import { installWindowVisibilityInterval } from '@/lib/window-visibility-interval'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type CommitMessageAgentChoice,
|
||||
type CommitMessageModelCapability
|
||||
} from '../../../../shared/source-control/ai/generation/commit-message-agent-spec'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
|
||||
export const EMPTY_COMMIT_MESSAGE_AI_SETTINGS: CommitMessageAiSettings = {
|
||||
enabled: false,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { ORCA_CLI_SKILL_NAME, ORCHESTRATION_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import {
|
||||
ORCA_CLI_SKILL_NAME,
|
||||
ORCHESTRATION_SKILL_NAME
|
||||
} from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import {
|
||||
GLOBAL_AGENT_SKILL_SOURCE_KINDS,
|
||||
useInstalledAgentSkill
|
||||
|
||||
@@ -11,7 +11,7 @@ import { LOCAL_COMMIT_MESSAGE_HOST_KEY } from '../../../../shared/source-control
|
||||
import { getDefaultSourceControlAiSettings } from '../../../../shared/source-control/ai/settings/source-control-ai-settings'
|
||||
import { getTextGenerationModels } from '../../../../shared/source-control/ai/settings/source-control-ai-model-selection'
|
||||
import { isTuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent-config'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import type {
|
||||
AgentPickerDraft,
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import {
|
||||
import { AgentSkillSetupPanel } from '@/components/skills/setup/AgentSkillSetupPanel'
|
||||
import { IntegrationStatusPill } from '@/components/integration-status-pill'
|
||||
import { SkillFreshnessStatusPill } from '@/components/skills/SkillFreshnessStatusPill'
|
||||
import { ORCHESTRATION_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCHESTRATION_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import {
|
||||
GLOBAL_AGENT_SKILL_SOURCE_KINDS,
|
||||
useInstalledAgentSkill
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useCallback, useMemo } from 'react'
|
||||
import { Maximize2, Minimize2, Minus } from 'lucide-react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { getAgentCatalog, AgentIcon } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { focusTerminalTabSurface } from '@/lib/focus-terminal-tab-surface'
|
||||
import { launchAgentInNewTab } from '@/lib/agent-session/launch/new-tab/launch-agent-in-new-tab'
|
||||
import { newAgentLaunchRequestId } from '@/lib/agent-session/launch/routing/agent-launch-request-id'
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useEffect } from 'react'
|
||||
import { isOrcaCliAvailableOnPath } from '@/lib/agent-skill-cli-prerequisite'
|
||||
import { isOrcaCliAvailableOnPath } from '@/lib/skills/installation/agent-skill-cli-prerequisite'
|
||||
import {
|
||||
ORCHESTRATION_SETUP_STATE_EVENT,
|
||||
hasOrchestrationSetupMarker,
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import {
|
||||
captureNativeChatStagedInput
|
||||
} from '../../drafts/native-chat-draft-attachment-staging'
|
||||
import { mayHoldAgentReferences } from '../../../../../../shared/orchestration/mailbox/orchestration-agent-reference'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { formatAgentTypeLabel } from '../../../../../../shared/agent-status/presentation/agent-type-label'
|
||||
import { isTuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent-config'
|
||||
import { MAX_SKILL_REFS } from '../../../../../../shared/rpc-contract/structured-agent-session-message-params'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TriangleAlert } from 'lucide-react'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { agentTypeToIconAgent } from '../../../../../shared/agent-status/presentation/agent-type-icon-agent'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { AgentType } from '../../../../../shared/agent-status/contracts/agent-status-types'
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import {
|
||||
import { createWorktreeAgentFreshnessSelector } from '@/components/sidebar/workspace-card/activity/worktree-agent-freshness-selector'
|
||||
import '@/components/sidebar/workspace-card/activity/worktree-agent-row-selectors'
|
||||
import { selectWorktreeAgentOrchestration as selectRuntimeAgentOrchestrationForWorktree } from '@/components/sidebar/workspace-card/activity/worktree-agent-orchestration-index'
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-row-dot-state'
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-status/presentation/agent-row-dot-state'
|
||||
import { resolveRowProgramStatus } from '@/lib/program-status/agent-row-presentation'
|
||||
import {
|
||||
agentMessageSenderView,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { useId } from 'react'
|
||||
import { ChevronDown } from 'lucide-react'
|
||||
import { AgentStateDot } from '@/components/AgentStateDot'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
@@ -9,7 +9,7 @@ import { AgentSessionContinuationDialog } from '@/components/agent-session-conti
|
||||
import {
|
||||
buildAgentSessionContinuationPrompt,
|
||||
type AgentSessionContinuationRequest
|
||||
} from '@/lib/agent-session-continuation'
|
||||
} from '@/lib/agent-session/context/agent-session-continuation'
|
||||
import { isTuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent-config'
|
||||
import { callStructuredAgentSession } from '@/runtime/native-chat/requests/structured-agent-session-call'
|
||||
import { supportsStructuredAgentSessionContinuationContext } from '@/runtime/native-chat/host-capabilities/structured-agent-session-host-support'
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { useCallback, useLayoutEffect, useRef, useState } from 'react'
|
||||
import { executionHostIdForStructuredTarget } from '@/runtime/native-chat/session-ownership/structured-agent-session-owner'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import type { AgentType } from '../../../../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { copyAgentSessionContext } from '@/lib/copy-agent-session-context'
|
||||
import { copyAgentSessionContext } from '@/lib/agent-session/context/copy-agent-session-context'
|
||||
import {
|
||||
resolveNativeChatSessionContext,
|
||||
type NativeChatSessionContextSource
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ import {
|
||||
} from '../../../../../shared/workspace-layout/stable-pane-id'
|
||||
import type { AppState } from '@/store/types'
|
||||
import { useAppStore } from '@/store'
|
||||
import type { AgentMessageTarget } from '@/lib/agent-message-target'
|
||||
import { sendMessageToAgent } from '@/lib/agent-message-send'
|
||||
import type { ActiveAgentNotesSendResult } from '@/lib/active-agent-note-send-result'
|
||||
import type { AgentMessageTarget } from '@/lib/agent-session/messaging/agent-message-target'
|
||||
import { sendMessageToAgent } from '@/lib/agent-session/messaging/agent-message-send'
|
||||
import type { ActiveAgentNotesSendResult } from '@/lib/agent-session/messaging/terminal/active-agent-note-send-result'
|
||||
import { activateStructuredAgentSessionTab } from '@/lib/agent-session/structured-agent-session-tab-activation'
|
||||
import { activateTabAndFocusPane } from '@/lib/workspace/tabs/activate-tab-and-focus-pane'
|
||||
import { activateTerminalTabOnOwner } from '@/lib/workspace/tabs/terminal-tab-owner-activation'
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import { Terminal } from '@xterm/headless'
|
||||
import { SerializeAddon } from '@xterm/addon-serialize'
|
||||
import { readClaudeSessionOptionsFromTerminalScreen } from './claude-terminal-session-options'
|
||||
import { buildBoundedSessionTranscript } from '@/lib/agent-session-fork-context'
|
||||
import { buildBoundedSessionTranscript } from '@/lib/agent-session/context/agent-session-fork-context'
|
||||
|
||||
const CLAUDE_FRAME = [
|
||||
'╭─ Claude Code ───╮',
|
||||
|
||||
+6
-3
@@ -3,10 +3,13 @@ import {
|
||||
agentChildRowContextForParent,
|
||||
type AgentChildRowContext
|
||||
} from '../../../../../../shared/agent-status/presentation/agent-child-row-model'
|
||||
import { AGENT_STATUS_STALE_AFTER_MS } from '../../../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import {
|
||||
AGENT_STATUS_STALE_AFTER_MS,
|
||||
isAgentStatusFresh
|
||||
} from '../../../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import type { AgentStatusEntry } from '../../../../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { useNow } from '@/hooks/use-now'
|
||||
import { isExplicitAgentStatusFresh } from '@/lib/pane-agent-evidence'
|
||||
|
||||
import { useAppStore } from '@/store'
|
||||
|
||||
/** The verdict a session's status row gives its children, exactly as the sidebar derives it. */
|
||||
@@ -16,7 +19,7 @@ export function structuredSessionChildRowContext(
|
||||
): AgentChildRowContext {
|
||||
return agentChildRowContextForParent(
|
||||
parent,
|
||||
isExplicitAgentStatusFresh(parent, now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
isAgentStatusFresh(parent, now, AGENT_STATUS_STALE_AFTER_MS)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { AgentSessionContinuationDialog } from '@/components/agent-session-conti
|
||||
import {
|
||||
buildAgentSessionContinuationPrompt,
|
||||
type AgentSessionContinuationRequest
|
||||
} from '@/lib/agent-session-continuation'
|
||||
} from '@/lib/agent-session/context/agent-session-continuation'
|
||||
import { ClaudeSwitcherMenu } from '@/components/status-bar/ClaudeSwitcherMenu'
|
||||
import { ProviderAccountChatButton } from '@/components/status-bar/ProviderAccountChatButton'
|
||||
import { isTuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent-config'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Check } from 'lucide-react'
|
||||
import { AgentIcon, type AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
export function AgentSectionHeader({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react'
|
||||
import { ExternalLink } from 'lucide-react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { getAgentCatalog, type AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog, type AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'
|
||||
import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { MessagesSquare, SquareTerminal } from 'lucide-react'
|
||||
import { AgentIcon, getAgentLabel } from '@/lib/agent-catalog'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
|
||||
// Shell text, not prose: what a terminal shows when the agent's CLI starts.
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useId, useState } from 'react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { useAppStore } from '@/store'
|
||||
import {
|
||||
applyAgentPermissionOverrides,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useAppStore } from '@/store'
|
||||
import { resolveDefaultAgentForWorktree } from '@/lib/agent-tab-shortcuts'
|
||||
import { resolveDefaultAgentForWorktree } from '@/lib/agent-session/launch/shortcuts/agent-tab-shortcuts'
|
||||
import { agentTabLaunchStore } from '@/lib/agent-session/launch/new-tab/launch-agent-execution-context'
|
||||
import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import type { ExecutionHostId } from '../../../../shared/execution-host'
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
ComputerUsePermissionSetupResult,
|
||||
ComputerUsePermissionStatusResult
|
||||
} from '../../../../shared/computer-use-permissions-types'
|
||||
import { ORCHESTRATION_SKILL_NAME } from '@/lib/agent-feature-skill-names'
|
||||
import { ORCHESTRATION_SKILL_NAME } from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import { BROWSER_USE_ENABLED_STORAGE_KEY } from '@/lib/browser/browser-use-setup-state'
|
||||
import { ORCHESTRATION_ENABLED_STORAGE_KEY } from '@/lib/orchestration-setup-state'
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ORCA_LINEAR_SKILL_NAME,
|
||||
ORCA_CLI_SKILL_NAME,
|
||||
ORCHESTRATION_SKILL_NAME
|
||||
} from '@/lib/agent-feature-skill-names'
|
||||
} from '@/lib/skills/installation/agent-feature-skill-names'
|
||||
import { BROWSER_USE_ENABLED_STORAGE_KEY } from '@/lib/browser/browser-use-setup-state'
|
||||
import { e2eConfig } from '@/lib/e2e-config'
|
||||
import {
|
||||
|
||||
@@ -3,7 +3,10 @@ import { LOCAL_EXECUTION_HOST_ID } from '../../../../shared/execution-host'
|
||||
import type { GlobalSettings } from '../../../../shared/global-settings-types'
|
||||
import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import { nativeChatPreferenceFor } from '../../../../shared/structured-native-chat-launch-route'
|
||||
import { chatProviderAgents, useHostStructuredAgentsVersion } from '@/lib/chat-provider-agents'
|
||||
import {
|
||||
chatProviderAgents,
|
||||
useHostStructuredAgentsVersion
|
||||
} from '@/runtime/native-chat/agent-catalogs/chat-provider-agents'
|
||||
import { recomputeOn } from '@/lib/recompute-on'
|
||||
import type { ProspectiveWorkspace } from '@/lib/agent-session/launch/routing/agent-launch-route-input'
|
||||
import { readChatProgram, resolveChatProgramContext } from '@/lib/host-chat-program'
|
||||
|
||||
@@ -54,7 +54,9 @@ vi.mock('@/components/agent-tab-launch-context', () => ({
|
||||
captureAgentTabLaunchContext: () => ({ groupId: 'group', focusIntent })
|
||||
}))
|
||||
vi.mock('@/lib/telemetry', () => ({ track }))
|
||||
vi.mock('@/lib/agent-detection-target-inventory', () => ({ loadDetectedAgentsForWorktree: detect }))
|
||||
vi.mock('@/lib/agent-session/launch/inventory/agent-detection-target-inventory', () => ({
|
||||
loadDetectedAgentsForWorktree: detect
|
||||
}))
|
||||
vi.mock('@/lib/host-chat-program-acquisition', () => ({
|
||||
acquireAgentLaunchChoices: acquireChoices
|
||||
}))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { useAppStore } from '@/store'
|
||||
import { selectOnboardingWorkspaceId } from './onboarding-workspace-selection'
|
||||
import { applyDocumentTheme } from '@/lib/document-theme'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useMemo } from 'react'
|
||||
import StatusIndicator from '@/components/sidebar/workspace-card/surface/StatusIndicator'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { AgentTypeIcon } from '@/lib/agent-type-icon'
|
||||
import { AgentTypeIcon } from '@/components/agent/icons/agent-type-icon'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog'
|
||||
import { mapAgentStatusStateToVisualStatus } from '@/lib/agent-status'
|
||||
import { getAgentLabel } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { mapAgentStatusStateToVisualStatus } from '@/lib/agent-status/aggregation/worktree-agent-status'
|
||||
import { getWorktreeStatusLabel, type WorktreeStatus } from '@/lib/worktree-status'
|
||||
import {
|
||||
useAgentMessageSenderViews,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { usePetUrl } from './usePetUrl'
|
||||
import type { DetectedSpriteCacheEntry } from './pet-blob-cache'
|
||||
import type { CustomPet } from '../../../../shared/pet-types'
|
||||
import { useAppStore } from '../../store'
|
||||
import { getAgentStatusEpochNow } from '@/lib/agent-status-epoch-clock'
|
||||
import { getAgentStatusEpochNow } from '@/lib/agent-status/evidence/agent-status-epoch-clock'
|
||||
import { AGENT_STATUS_STALE_AFTER_MS } from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
import {
|
||||
selectPetAnimationName,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentStatusEntry } from '../../../../shared/agent-status/contracts/agent-status-types'
|
||||
import { isExplicitAgentStatusFresh } from '@/lib/pane-agent-evidence'
|
||||
import { isAgentStatusFresh } from '../../../../shared/agent-status/contracts/agent-status-freshness'
|
||||
|
||||
export type PetAnimationName =
|
||||
| 'idle'
|
||||
@@ -46,7 +46,7 @@ function agentStateAnimation(
|
||||
let hasDone = false
|
||||
|
||||
for (const entry of entries) {
|
||||
if (!isExplicitAgentStatusFresh(entry, now, staleAfterMs)) {
|
||||
if (!isAgentStatusFresh(entry, now, staleAfterMs)) {
|
||||
continue
|
||||
}
|
||||
if (entry.state === 'blocked' || entry.state === 'waiting') {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { agentLaunchRecoveryMessage, notifyAgentLaunchFailure } from '@/lib/agent-launch-failure'
|
||||
import {
|
||||
agentLaunchRecoveryMessage,
|
||||
notifyAgentLaunchFailure
|
||||
} from '@/lib/agent-session/launch/failure/agent-launch-failure'
|
||||
import type { DirectWorkItemLaunchResult } from '@/lib/workspace/creation/work-item/direct-work-item-setup'
|
||||
import { toast } from 'sonner'
|
||||
import { useAppStore } from '@/store'
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { cn } from '@/lib/utils'
|
||||
import {
|
||||
AI_VAULT_AGENTS,
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/component
|
||||
import { useNow } from '@/hooks/use-now'
|
||||
import { getIntlLocale, translate } from '@/i18n/i18n'
|
||||
import { useIntlLocale, useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type {
|
||||
AiVaultScanAgentProgress,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-row-dot-state'
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-status/presentation/agent-row-dot-state'
|
||||
import type { AgentDotState } from '@/components/AgentStateDot'
|
||||
import type { AiVaultSession } from '../../../../../../shared/ai-vault/contracts/ai-vault-types'
|
||||
import {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-row-dot-state'
|
||||
import { agentRowDisplayDotState } from '@/lib/agent-status/presentation/agent-row-dot-state'
|
||||
import type { AppState } from '@/store/types'
|
||||
import { resolveRuntimePaneTitleLeafId } from '../../../../../../shared/runtime-pane-title-leaf-id'
|
||||
import type { AgentDotState } from '@/components/AgentStateDot'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { AgentSessionContinuationRequest } from '@/lib/agent-session-continuation'
|
||||
import type { AgentSessionContinuationRequest } from '@/lib/agent-session/context/agent-session-continuation'
|
||||
import type { AiVaultSession } from '../../../../../../shared/ai-vault/contracts/ai-vault-types'
|
||||
|
||||
export function canContinueAiVaultSessionInNewSession(
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import { translate } from '@/i18n/i18n'
|
||||
import { describeAiVaultCliForkFailure } from './ai-vault-session-cli-fork'
|
||||
import type { AiVaultSessionResumeTargetState } from './ai-vault-session-resume'
|
||||
import { prepareAiVaultSessionContinuation } from './ai-vault-session-continuation'
|
||||
import type { AgentSessionContinuationRequest } from '@/lib/agent-session-continuation'
|
||||
import type { AgentSessionContinuationRequest } from '@/lib/agent-session/context/agent-session-continuation'
|
||||
import { activateAiVaultStructuredSession } from '@/lib/activate-ai-vault-structured-session'
|
||||
import { adoptsCliConversations } from '../../../../../../shared/structured-agent-cli-conversation-adoption'
|
||||
import { newAgentLaunchRequestId } from '@/lib/agent-session/launch/routing/agent-launch-request-id'
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { Badge } from '@/components/ui/badge'
|
||||
import { WorktreeHostContextBadge } from '@/components/sidebar/workspace-card/host/WorktreeHostContextBadge'
|
||||
import RepoBadgeLabel from '@/components/repo/RepoBadgeLabel'
|
||||
import { AgentStateDot, type AgentDotState } from '@/components/AgentStateDot'
|
||||
import { AgentIcon } from '@/lib/agent-catalog'
|
||||
import { AgentIcon } from '@/components/agent/icons/AgentIcon'
|
||||
|
||||
import { useRepoById } from '@/store/repos/use-repository-catalog'
|
||||
import { resolveRepoBadgeColor } from '../../../../../../shared/repo-badge-color'
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { useActiveWorktree } from '@/store/workspaces/selection/use-selected-wor
|
||||
import { selectReviewRepositoryForWorkspace } from '@/store/slices/hosted-review/workspace-review-repository'
|
||||
import { useChecksPanelTerminalWorktree } from './refresh/use-checks-panel-terminal-worktree'
|
||||
import { getConnectionId } from '@/lib/workspace/ownership/connection-context'
|
||||
import { readDetectedAgentsForWorktree } from '@/lib/agent-detection-target-inventory'
|
||||
import { readDetectedAgentsForWorktree } from '@/lib/agent-session/launch/inventory/agent-detection-target-inventory'
|
||||
import { useMountedRef } from '@/hooks/useMountedRef'
|
||||
import { useConfirmationDialog } from '@/components/confirmation-dialog-context'
|
||||
import { getWorktreeGitIdentityDisplay } from '../../../../../shared/worktree/git-identity-display'
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue
|
||||
} from '@/components/ui/select'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog'
|
||||
import type { AgentCatalogEntry } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { SourceControlLaunchActionId } from '../../../../../../shared/source-control/ai/recipes/source-control-ai-actions'
|
||||
import type { SourceControlAiWriteTarget } from '../../../../../../shared/source-control/ai/settings/source-control-ai-recipe-save'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AppState } from '@/store/types'
|
||||
import type { WorktreeAgentInventoryState } from '@/lib/agent-detection-target-inventory'
|
||||
import type { WorktreeAgentInventoryState } from '@/lib/agent-session/launch/inventory/agent-detection-target-inventory'
|
||||
import type {
|
||||
GitConflictOperation,
|
||||
GitStatusEntry
|
||||
|
||||
@@ -22,7 +22,7 @@ import { getConnectionId } from '@/lib/workspace/ownership/connection-context'
|
||||
import {
|
||||
ensureDetectedAgentsForWorktree,
|
||||
type WorktreeAgentInventoryState
|
||||
} from '@/lib/agent-detection-target-inventory'
|
||||
} from '@/lib/agent-session/launch/inventory/agent-detection-target-inventory'
|
||||
import {
|
||||
pickSourceControlLaunchAgent,
|
||||
readSourceControlLaunchRecipeAgentId
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import { newAgentLaunchRequestId } from '@/lib/agent-session/launch/routing/agen
|
||||
import type { RuntimeGitContext } from '@/runtime/source-control/git/runtime-git-client-context'
|
||||
import type { Repo } from '../../../../../../shared/repo-types'
|
||||
import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import type { AgentLaunchChoice } from '@/lib/agent-menu-selection'
|
||||
import type { AgentLaunchChoice } from '@/lib/agent-session/launch/routing/agent-menu-selection'
|
||||
import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas'
|
||||
import {
|
||||
normalizeSourceControlActionRecipe,
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import {
|
||||
} from '../../../../../../shared/source-control/ai/recipes/source-control-action-options'
|
||||
import { sourceControlActionSelectedPreferences } from '../../../../../../shared/source-control/ai/recipes/source-control-action-launch-preferences'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { AGENT_CATALOG } from '@/lib/agent-catalog'
|
||||
import { AGENT_CATALOG } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { agentPermissionChoiceLabel } from '../../../agent/launch-settings/agent-permission-choice-label'
|
||||
import { sourceControlActionRouteHint } from '../../../agent/launch-settings/agent-choice-route-hint'
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import type {
|
||||
CurrentActionSelection,
|
||||
SelectedSourceControlActionRecipe
|
||||
} from '../../../../../../shared/source-control/ai/recipes/source-control-action-selection'
|
||||
import type { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import type { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import type { useAppStore } from '@/store/index'
|
||||
import type { useRepoById } from '@/store/repos/use-repository-catalog'
|
||||
import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent'
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { useAppStore } from '@/store/index'
|
||||
import { ensureDetectedAgentsForWorktree } from '@/lib/agent-detection-target-inventory'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { ensureDetectedAgentsForWorktree } from '@/lib/agent-session/launch/inventory/agent-detection-target-inventory'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { isTuiAgentEnabled } from '../../../../../../shared/agent-launch/catalog/tui-agent-selection'
|
||||
import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import type { SourceControlAiWriteTarget } from '../../../../../../shared/source-control/ai/settings/source-control-ai-recipe-save'
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue
|
||||
} from '@/components/ui/select'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import { AgentLaunchPicker } from '@/components/agent/AgentLaunchPicker'
|
||||
import { DropdownMenuItem } from '@/components/ui/dropdown-menu'
|
||||
import { commitMessagePickerModel } from '@/components/feature-wall/ai-commit-pr-picker'
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import { parseExecutionHostId } from '../../../../../../shared/execution-host'
|
||||
import { useRef, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import { ensureDetectedAgentsForWorktree } from '@/lib/agent-detection-target-inventory'
|
||||
import { ensureDetectedAgentsForWorktree } from '@/lib/agent-session/launch/inventory/agent-detection-target-inventory'
|
||||
import { isTuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent-config'
|
||||
import { projectSelectedSourceControlActionLaunch } from '../../../../../../shared/source-control/ai/recipes/source-control-action-launch-preferences'
|
||||
import { sourceControlLaunchAppliesAgentArgs } from './source-control-launch-agent-args-applicability'
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import type { SelectedSourceControlActionRecipe } from '../../../../../../shared
|
||||
import type { Repo } from '../../../../../../shared/repo-types'
|
||||
import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent'
|
||||
import { isTuiAgentEnabled } from '../../../../../../shared/agent-launch/catalog/tui-agent-selection'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog'
|
||||
import { getAgentCatalog } from '@/lib/agent-catalog/agent-catalog'
|
||||
import type { AgentLaunchSurface } from '@/lib/agent-session/launch/routing/agent-session-launch-plan'
|
||||
import { useAgentDetectionTargetForWorktree } from '@/hooks/useAgentDetectionTarget'
|
||||
import { useAgentMenuObservation } from '@/components/tab-bar/use-new-tab-agent-menu-rows'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user