1688
return undefined;
1689
}
1691
>
provider: provider.id,
1692
>
workingDirectory: config.workingDirectory,
1693
>
config: config.config,
1694
>
};
1695
>
try {
1696
>
// Wrap with the host's isolation schema so the created config carries the
1697
>
// `isolation` / `branch` values (and their git-derived defaults). The
1698
>
// agent's own `resolveSessionConfig` omits them (isolation is host-owned),
1699
>
// so without this a fresh worktree session's isolation is `undefined` at
1700
>
// create time — the pending mark below is skipped and the send falls back
1701
>
// to folder even though the user picked worktree.
1702
>
const resolved = await this._withIsolationSchema(await provider.resolveSessionConfig(this._toProviderConfig(params)), params);
1703
>
return { schema: resolved.schema, values: resolved.values };
1704
>
} catch (err) {
1705
this._logService.error(`[AgentService] Failed to resolve created session config for provider ${provider.id}`, err);
1706
return config.config ? { schema: { type: 'object', properties: {} }, values: config.config } : undefined;