slopus--happy
98e40dac97
CLI Smoke Test / smoke-test-linux (20) (push) Has been cancelled
CLI Smoke Test / smoke-test-linux (24) (push) Has been cancelled
CLI Smoke Test / smoke-test-windows (20) (push) Has been cancelled
CLI Smoke Test / smoke-test-windows (24) (push) Has been cancelled
Expo App TypeScript typecheck / typecheck (push) Has been cancelled
32 行
721 B
TypeScript
32 行
721 B
TypeScript
type AgentPickerSource = {
|
|
key: string;
|
|
label: string;
|
|
};
|
|
|
|
type ModePickerSource = {
|
|
key: string;
|
|
name: string;
|
|
description?: string | null;
|
|
};
|
|
|
|
export type NewSessionPickerItem = {
|
|
key: string;
|
|
label: string;
|
|
subtitle?: string;
|
|
};
|
|
|
|
export function getAgentPickerItems(agents: AgentPickerSource[]): NewSessionPickerItem[] {
|
|
return agents.map((agent) => ({
|
|
key: agent.key,
|
|
label: agent.label,
|
|
}));
|
|
}
|
|
|
|
export function getModePickerItems(options: ModePickerSource[]): NewSessionPickerItem[] {
|
|
return options.map((option) => ({
|
|
key: option.key,
|
|
label: option.name,
|
|
...(option.description ? { subtitle: option.description } : {}),
|
|
}));
|
|
}
|