Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/AgentSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react";
import type { Agents } from "../features/agents/service";
import type { AgentsClient } from "../features/agents/service";
import { AgentDefaults } from "../bundled/agents/AgentDefaults";
import { Header, InlineHeader } from "../shared/design-system/ui/Header";

Expand All @@ -16,7 +16,7 @@ export function AgentSettings({
agents,
active = true,
}: {
agents?: Agents | undefined;
agents?: AgentsClient | undefined;
active?: boolean;
}) {
const rememberAgents = useRememberAgentsPreference();
Expand Down
4 changes: 2 additions & 2 deletions src/app/DecisionsSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useSyncExternalStore } from "react";
import type { Agents, AgentsSnapshot } from "../features/agents/service";
import type { AgentsClient, AgentsSnapshot } from "../features/agents/service";
import { isApplePlatform } from "../features/shortcuts/format";
import { Button } from "../shared/design-system/ui/Button";
import { Field } from "../shared/design-system/ui/Field";
Expand Down Expand Up @@ -28,7 +28,7 @@ export function DecisionsSettings({
apple = isApplePlatform(navigator.platform),
}: {
agents: Pick<
Agents,
AgentsClient,
"snapshot" | "subscribe" | "setClassifierKey" | "clearClassifierKey"
>;
active(): boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/app/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "motion/react";
import { SidebarNavigation } from "../shared/design-system/ui/SidebarNavigation";
import { CommunityAddress } from "./CommunityAddress";
import type { Agents } from "../features/agents/service";
import type { AgentsClient } from "../features/agents/service";
import type { DecisionsService } from "../features/decisions/service";
import { DecisionsSettings } from "./DecisionsSettings";
import { Header, InlineHeader } from "../shared/design-system/ui/Header";
Expand Down Expand Up @@ -595,7 +595,7 @@ export function Settings({
onDeparturePending,
onUnsavedChange,
}: {
agents?: Agents | undefined;
agents?: AgentsClient | undefined;
decisions?: DecisionsService | undefined;
cards: SettingsCards;
plugins: PluginManager;
Expand Down
4 changes: 2 additions & 2 deletions src/app/shell/NewMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useState, useSyncExternalStore } from "react";
import type { Agents } from "../../features/agents/service";
import type { AgentsClient } from "../../features/agents/service";
import { CreateChannelDialog } from "../../bundled/channels/CreateChannelDialog";
import { revealCreatedChannel } from "../../features/channel-navigation/created-channel";
import { useSidebarPreferences } from "../../bundled/channels/useSidebarPreferences";
Expand All @@ -24,7 +24,7 @@ import { PlusIcon } from "../../shared/design-system/icons";
type Props = {
relay: RelayData;
navigator: Navigation;
agents?: Agents | undefined;
agents?: AgentsClient | undefined;
};

export function NewMenu(props: Props) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/shell/PrimarySidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ResizableSidebar } from "../../features/channel-navigation/ResizableSid
import { SidebarUnread } from "../../bundled/channels/SidebarUnread";
import { Button } from "../../shared/design-system/ui/Button";
import type { RelayData } from "../../features/relay/service";
import type { Agents } from "../../features/agents/service";
import type { AgentsClient } from "../../features/agents/service";
import type { Navigation } from "../../features/navigation/controller";
import type { OpenTarget } from "../../features/navigation/targets";
import { InlineHeader } from "../../shared/design-system/ui/Header";
Expand All @@ -42,7 +42,7 @@ const filters = [
type Props = {
relay: RelayData;
navigator: Navigation;
agents?: Agents | undefined;
agents?: AgentsClient | undefined;
chatIcons?: ContributionReader<ChatIcon> | undefined;
chatMenus?: ContributionReader<ChatMenu> | undefined;
target: OpenTarget;
Expand Down
4 changes: 2 additions & 2 deletions src/app/shell/sidebar-testing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { Navigation } from "../../features/navigation/controller";
import { ChannelNavigationProvider } from "../../features/channel-navigation/ChannelNavigationState";
import type { OpenTarget } from "../../features/navigation/targets";
import { NewMenu } from "./NewMenu";
import type { Agents } from "../../features/agents/service";
import type { AgentsClient } from "../../features/agents/service";
import { PrimarySidebar } from "./PrimarySidebar";
import { ToastProvider } from "../../shared/design-system/ui/Toast";
import { SoloInventory } from "../../features/channel-navigation/SoloInventory";
Expand All @@ -28,7 +28,7 @@ export const scope = `https://relay.test:${viewer}`;
export function fixture(
combined = false,
canCreate = false,
agents?: Agents,
agents?: AgentsClient,
counts = { observedCount: 2, attentionCount: 1 },
/** Newer, read Solo chats ahead of Planning and Other; only Planning is unread. */
newer = 0,
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agent-activity/ActivityAccessory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
import { currentActivity } from "./current-activity";
import { messageWork } from "./message-activity";
import type { ActivityTurn } from "../../features/agents/activity";
import type { Agents } from "../../features/agents/service";
import type { AgentsClient } from "../../features/agents/service";
import {
requestWork,
type RequestWork,
Expand All @@ -50,7 +50,7 @@ const noSubscribe = () => () => {};
* its provider may never report the turn's end. */
const HOSTED_STOP_MS = 30_000;
/** What Stop needs of Agents: a hosted agent's provider stops its turns. */
export type ActivityAgents = Pick<Agents, "interruptible" | "interrupt">;
export type ActivityAgents = Pick<AgentsClient, "interruptible" | "interrupt">;
type ActivityProps = ComposerAccessoryProps & { agents?: ActivityAgents };
/** Activity belongs to the exact triggering message, not the composer. */
export function ActivityAccessory(props: ActivityProps) {
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/AgentBrowse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { flushSync } from "react-dom";
import { AGENT_CATALOG_KIND } from "../../features/agents/catalog-envelope";
import { ModelIcon } from "../../features/agents/ModelPicker";
import type {
Agents,
AgentsClient,
RegisteredAgentType,
} from "../../features/agents/service";
import {
Expand Down Expand Up @@ -49,7 +49,7 @@ import styles from "./AgentBrowse.module.css";
const pageSize = 200;

type Importing = Readonly<{
agents: Agents;
agents: AgentsClient;
/** The types an import can be, which run on this computer. */
types: readonly RegisteredAgentType[];
onImported(): void;
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/AgentCreateDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useId, useRef, useState } from "react";
import { randomAgentAvatar } from "../../features/agents/avatar-packs";
import type {
Agent,
Agents,
AgentsClient,
RegisteredAgentType,
NewAgent,
AgentCreationRequest,
Expand Down Expand Up @@ -60,7 +60,7 @@ export function AgentCreateDialog({
onCreate,
update,
}: {
agents: Agents;
agents: AgentsClient;
types: readonly RegisteredAgentType[];
community?: string | undefined;
onClose(): void;
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/AgentDefaults.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
import type {
Agents,
AgentsClient,
RegisteredAgentType,
} from "../../features/agents/service";
import {
Expand All @@ -14,7 +14,7 @@ import { PreferenceRow } from "../../shared/design-system/ui/PreferenceRow";
import { SettingsGroup } from "../../shared/design-system/ui/SettingsGroup";
import { ProviderDialog } from "./ProviderDialog";

export function AgentDefaults({ agents }: { agents: Agents }) {
export function AgentDefaults({ agents }: { agents: AgentsClient }) {
const types = useSyncExternalStore(
agents.subscribe,
agents.types,
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/AgentDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { ChannelChoice } from "../../features/agents/attention";
import type { AgentMemories } from "../../features/agents/MemoryPanel";
import type {
Agent,
Agents,
AgentsClient,
AgentConversation,
RegisteredAgentType,
} from "../../features/agents/service";
Expand Down Expand Up @@ -69,7 +69,7 @@ export function AgentDetails({
conversation,
initialActivity,
}: {
agents: Agents;
agents: AgentsClient;
agent: Agent;
type: RegisteredAgentType | undefined;
types: readonly RegisteredAgentType[];
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/AgentIdentityDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type RefObject,
} from "react";
import { useReducedMotion } from "motion/react";
import type { Agent, Agents } from "../../features/agents/service";
import type { Agent, AgentsClient } from "../../features/agents/service";
import { Button } from "../../shared/design-system/ui/Button";
import { Dialog } from "../../shared/design-system/ui/Dialog";
import { AgentCreateHeader } from "./AgentCreateHeader";
Expand All @@ -22,7 +22,7 @@ export function AgentIdentityDialog({
initialAvatarPicker = false,
}: {
agent: Agent;
agents: Agents;
agents: AgentsClient;
onClose(): void;
finalFocus: RefObject<HTMLButtonElement | null>;
initialAvatarPicker?: boolean;
Expand Down
14 changes: 7 additions & 7 deletions src/bundled/agents/AgentSettingsHost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRef, useState } from "react";
import type {
Agent,
AgentSettingsHost,
Agents,
AgentsClient,
Carry,
RegisteredAgentType,
} from "../../features/agents/service";
Expand All @@ -26,7 +26,7 @@ const message = (error: unknown) =>

/** One settings composition for both the Agents page and profile panes. */
export function useAgentSettingsHost(options: {
agents: Agents;
agents: AgentsClient;
agent: Agent;
type: RegisteredAgentType | undefined;
types: readonly RegisteredAgentType[];
Expand All @@ -36,7 +36,7 @@ export function useAgentSettingsHost(options: {
settingsHost: AgentSettingsHost;
};
export function useAgentSettingsHost(options: {
agents: Agents | undefined;
agents: AgentsClient | undefined;
agent: Agent | undefined;
type: RegisteredAgentType | undefined;
types: readonly RegisteredAgentType[];
Expand All @@ -51,7 +51,7 @@ export function useAgentSettingsHost({
type,
types,
}: {
agents: Agents | undefined;
agents: AgentsClient | undefined;
agent: Agent | undefined;
type: RegisteredAgentType | undefined;
types: readonly RegisteredAgentType[];
Expand Down Expand Up @@ -124,7 +124,7 @@ function TypeField({
selected,
onSelect,
}: {
agents: Agents;
agents: AgentsClient;
agent: Agent;
type: RegisteredAgentType | undefined;
types: readonly RegisteredAgentType[];
Expand All @@ -143,7 +143,7 @@ function TypeField({
const [configuring, setConfiguring] = useState(false);
const [migration, setMigration] = useState<{
target: RegisteredAgentType;
preview: ReturnType<Agents["previewRetype"]>;
preview: ReturnType<AgentsClient["previewRetype"]>;
}>();
const choose = (next: string) => {
if (next === selected) return;
Expand Down Expand Up @@ -312,7 +312,7 @@ export function MigrationPreview({
}: {
source: RegisteredAgentType | undefined;
target: RegisteredAgentType;
preview: ReturnType<Agents["previewRetype"]>;
preview: ReturnType<AgentsClient["previewRetype"]>;
discardDraft: boolean;
}) {
const SourceIcon = source?.icon;
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/AgentTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
Agent,
AgentConversation,
AgentSettingsHost,
Agents,
AgentsClient,
RegisteredAgentType,
} from "../../features/agents/service";
import type { AgentMemories } from "../../features/agents/MemoryPanel";
Expand All @@ -13,7 +13,7 @@ import { Tabs } from "../../shared/design-system/ui/Tabs";

/** An agent's sections as tabs, opening on the first. */
export function AgentTabs(props: {
agents: Agents;
agents: AgentsClient;
agent: Agent;
type: RegisteredAgentType | undefined;
channels: readonly ChannelChoice[];
Expand Down
16 changes: 8 additions & 8 deletions src/bundled/agents/AgentsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import type {
} from "../../features/agents/native";
import type {
Agent,
Agents,
AgentsClient,
FoundAgents,
RegisteredAgentType,
Team,
Expand Down Expand Up @@ -135,7 +135,7 @@ export function AgentsPage({
navigation,
navigator,
}: {
agents: Agents;
agents: AgentsClient;
relay: RelayData;
navigation?: PageNavigation;
navigator?: Navigation;
Expand Down Expand Up @@ -611,7 +611,7 @@ export function AgentsPage({
}

type InventoryProps = {
service: Agents;
service: AgentsClient;
agents: readonly Agent[];
selected: string | undefined;
typeOf(agent: Agent): RegisteredAgentType | undefined;
Expand Down Expand Up @@ -861,7 +861,7 @@ function InventoryCard({
...props
}: Omit<React.ComponentProps<typeof AgentCard>, "agent"> & {
agent: Agent;
service: Agents;
service: AgentsClient;
type: RegisteredAgentType | undefined;
onBuild(): void;
onRemoved(): void;
Expand Down Expand Up @@ -1024,7 +1024,7 @@ function AgentPeek({
channels,
onClose,
}: {
agents: Agents;
agents: AgentsClient;
agent: Agent;
type: RegisteredAgentType | undefined;
channels: readonly ChannelChoice[];
Expand Down Expand Up @@ -1164,7 +1164,7 @@ function ImportAgents({
onImported,
onPendingChange,
}: {
agents: Agents;
agents: AgentsClient;
types: readonly RegisteredAgentType[];
/** The section its entry point imports. */
only: "agents" | "teams";
Expand Down Expand Up @@ -1599,7 +1599,7 @@ function Teams({
onEdit,
newTeam,
}: {
agents: Agents;
agents: AgentsClient;
saved: readonly Agent[];
teams: readonly Team[];
/** A team's id while it is edited, or "new" for one being made. */
Expand Down Expand Up @@ -1653,7 +1653,7 @@ function TeamEditor({
team,
onDone,
}: {
agents: Agents;
agents: AgentsClient;
saved: readonly Agent[];
team?: Team;
onDone(): void;
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/CreationReview.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useSyncExternalStore } from "react";
import { AgentCreateDialog } from "./AgentCreateDialog";
import type { Agents } from "../../features/agents/service";
import type { AgentsClient } from "../../features/agents/service";

/** The owner reviews the same creation form as a manually started agent. */
export function CreationReview({ agents }: { agents: Agents }) {
export function CreationReview({ agents }: { agents: AgentsClient }) {
const requests = useSyncExternalStore(
agents.subscribe,
agents.creationRequests,
Expand Down
4 changes: 2 additions & 2 deletions src/bundled/agents/UpdateReview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState, useSyncExternalStore } from "react";
import { AgentCreateDialog } from "./AgentCreateDialog";
import type { Agent, Agents } from "../../features/agents/service";
import type { Agent, AgentsClient } from "../../features/agents/service";

/** The owner reviews another agent's proposed changes in the same form as a
* new agent, filled in with the agent's settings. */
export function UpdateReview({ agents }: { agents: Agents }) {
export function UpdateReview({ agents }: { agents: AgentsClient }) {
const requests = useSyncExternalStore(
agents.subscribe,
agents.updateRequests,
Expand Down
Loading
Loading