Skip to content

The agent that grows with you

test(desktop): cover session create compatibility retry

Yuan Li9c90f6b5c869
diff --git a/apps/desktop/src/app/session/hooks/use-session-actions/index.ts b/apps/desktop/src/app/session/hooks/use-session-actions/index.ts
index bb310560680..ec873e43292 100644
--- a/apps/desktop/src/app/session/hooks/use-session-actions/index.ts
+++ b/apps/desktop/src/app/session/hooks/use-session-actions/index.ts
@@ -378,12 +378,12 @@ async function desktopSessionCreateParams(
* `cwd_explicit` is a newer session.create field, so retry only that narrow
* contract mismatch without dropping the workspace cwd itself.
*/
-function omitUnsupportedCwdExplicit(params: Record<string, unknown>): Record<string, unknown> {
+export function omitUnsupportedCwdExplicit(params: Record<string, unknown>): Record<string, unknown> {
const { cwd_explicit: _cwdExplicit, ...compatible } = params
return compatible
}
-async function requestSessionCreate<T>(
+export async function requestSessionCreate<T>(
params: Record<string, unknown>,
request: (requestParams: Record<string, unknown>) => Promise<T>
): Promise<T> {