feat: sdk subagent support

This commit is contained in:
mingholy.lmh
2025-11-25 10:03:15 +08:00
parent e1ffaec499
commit d76cdf1076
11 changed files with 705 additions and 41 deletions

View File

@@ -69,7 +69,10 @@ export function EditOptionsStep({
if (selectedValue === 'editor') {
// Launch editor directly
try {
await launchEditor(selectedAgent?.filePath);
if (!selectedAgent.filePath) {
throw new Error('Agent has no file path');
}
await launchEditor(selectedAgent.filePath);
} catch (err) {
setError(
t('Failed to launch editor: {{error}}', {

View File

@@ -267,7 +267,7 @@ export const AgentSelectionStep = ({
<Box flexDirection="column" marginBottom={1}>
<Text color={theme.text.primary} bold>
{t('Project Level ({{path}})', {
path: projectAgents[0].filePath.replace(/\/[^/]+$/, ''),
path: projectAgents[0].filePath?.replace(/\/[^/]+$/, '') || '',
})}
</Text>
<Box marginTop={1} flexDirection="column">
@@ -289,7 +289,7 @@ export const AgentSelectionStep = ({
>
<Text color={theme.text.primary} bold>
{t('User Level ({{path}})', {
path: userAgents[0].filePath.replace(/\/[^/]+$/, ''),
path: userAgents[0].filePath?.replace(/\/[^/]+$/, '') || '',
})}
</Text>
<Box marginTop={1} flexDirection="column">