fix(coding-agent): Clean up Path Handling (#4873)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { copyFileSync, existsSync, mkdirSync } from "node:fs";
|
||||
import { basename, join, resolve } from "node:path";
|
||||
import { resolvePath } from "../utils/paths.ts";
|
||||
import type { AgentSession } from "./agent-session.ts";
|
||||
import type { AgentSessionRuntimeDiagnostic, AgentSessionServices } from "./agent-session-services.ts";
|
||||
import type { ReplacedSessionContext, SessionShutdownEvent, SessionStartEvent } from "./extensions/index.ts";
|
||||
@@ -337,7 +338,7 @@ export class AgentSessionRuntime {
|
||||
* @throws {MissingSessionCwdError} When the imported session cwd cannot be resolved and no override is provided.
|
||||
*/
|
||||
async importFromJsonl(inputPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }> {
|
||||
const resolvedPath = resolve(inputPath);
|
||||
const resolvedPath = resolvePath(inputPath);
|
||||
if (!existsSync(resolvedPath)) {
|
||||
throw new SessionImportFileNotFoundError(resolvedPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user