dsh-vscode-mode 0.15.6 → 0.15.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/svn.ts CHANGED
@@ -12,6 +12,7 @@ import { tmpdir } from 'node:os'
12
12
  import type { Ctx, Session } from './store.js'
13
13
  import { cwdOf, sessionOf } from './registry.js'
14
14
  import type { SvnAction, SvnAiPlan, SvnChangeEntry, SvnConflictArtifact, SvnFeature, SvnIgnoreItem, SvnItemStatus, SvnLogEntry, SvnRemoteOutdatedEntry, SvnStatusPayload, SvnSumEntry } from './shared/svn.js'
15
+ import { SESSION_MISSING_ERROR, SESSION_NO_WORKSPACE_ERROR } from './shared/rpc.js'
15
16
  import { AI_PLAN_DIFF_CAP, AI_PLAN_PATHS_CAP, BATCH_PATHS_CAP, FILE_SIZES_CAP, SVN_CLI_DEFAULT, TORTOISE_EXE, contentGuardOf, normalizeAiPlan, svnChangelistNameErrorOf, tortoiseLaunchArgv } from './shared/svn.js'
16
17
  import type { AiConfigView } from './shared/ai.js'
17
18
  import { buildAiPrompt, svnAiPlanOf } from './ai/svnTriage.js'
@@ -461,9 +462,9 @@ async function requireSvnSession(
461
462
  sessionId?: string,
462
463
  ): Promise<{ cwd: string } | { err: string }> {
463
464
  const session: Session | undefined = sessionOf(ctx, sessionId)
464
- if (!session) return { err: '会话不存在' }
465
+ if (!session) return { err: SESSION_MISSING_ERROR }
465
466
  const cwd = cwdOf(session)
466
- if (!cwd) return { err: '会话无工作区' }
467
+ if (!cwd) return { err: SESSION_NO_WORKSPACE_ERROR }
467
468
  return { cwd }
468
469
  }
469
470