@openspecui/core 2.2.0 → 2.3.0

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/dist/index.d.mts CHANGED
@@ -19,13 +19,13 @@ declare const ChangeFileSchema: z.ZodObject<{
19
19
  /** Optional byte size for files */
20
20
  size: z.ZodOptional<z.ZodNumber>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- path: string;
23
22
  type: "file" | "directory";
23
+ path: string;
24
24
  content?: string | undefined;
25
25
  size?: number | undefined;
26
26
  }, {
27
- path: string;
28
27
  type: "file" | "directory";
28
+ path: string;
29
29
  content?: string | undefined;
30
30
  size?: number | undefined;
31
31
  }>;
@@ -306,11 +306,11 @@ declare const DeltaSpecSchema: z.ZodObject<{
306
306
  /** Raw markdown content of the delta spec */
307
307
  content: z.ZodString;
308
308
  }, "strip", z.ZodTypeAny, {
309
- content: string;
310
309
  specId: string;
311
- }, {
312
310
  content: string;
311
+ }, {
313
312
  specId: string;
313
+ content: string;
314
314
  }>;
315
315
  type DeltaSpec = z.infer<typeof DeltaSpecSchema>;
316
316
  /**
@@ -488,11 +488,11 @@ declare const ChangeSchema: z.ZodObject<{
488
488
  /** Raw markdown content of the delta spec */
489
489
  content: z.ZodString;
490
490
  }, "strip", z.ZodTypeAny, {
491
- content: string;
492
491
  specId: string;
493
- }, {
494
492
  content: string;
493
+ }, {
495
494
  specId: string;
495
+ content: string;
496
496
  }>, "many">>;
497
497
  /** Optional metadata */
498
498
  metadata: z.ZodOptional<z.ZodObject<{
@@ -549,8 +549,8 @@ declare const ChangeSchema: z.ZodObject<{
549
549
  } | undefined;
550
550
  design?: string | undefined;
551
551
  deltaSpecs?: {
552
- content: string;
553
552
  specId: string;
553
+ content: string;
554
554
  }[] | undefined;
555
555
  }, {
556
556
  id: string;
@@ -596,8 +596,8 @@ declare const ChangeSchema: z.ZodObject<{
596
596
  } | undefined;
597
597
  design?: string | undefined;
598
598
  deltaSpecs?: {
599
- content: string;
600
599
  specId: string;
600
+ content: string;
601
601
  }[] | undefined;
602
602
  }>;
603
603
  type Change = z.infer<typeof ChangeSchema>;
@@ -803,8 +803,8 @@ declare class OpenSpecAdapter {
803
803
  } | undefined;
804
804
  design?: string | undefined;
805
805
  deltaSpecs?: {
806
- content: string;
807
806
  specId: string;
807
+ content: string;
808
808
  }[] | undefined;
809
809
  }[];
810
810
  archivedCount: number;
@@ -1406,6 +1406,15 @@ declare const DashboardConfigSchema: z.ZodObject<{
1406
1406
  trendPointLimit?: number | undefined;
1407
1407
  }>;
1408
1408
  type DashboardConfig = z.infer<typeof DashboardConfigSchema>;
1409
+ declare const DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET = 1000;
1410
+ declare const GitConfigSchema: z.ZodObject<{
1411
+ diffEagerLineBudget: z.ZodDefault<z.ZodNumber>;
1412
+ }, "strip", z.ZodTypeAny, {
1413
+ diffEagerLineBudget: number;
1414
+ }, {
1415
+ diffEagerLineBudget?: number | undefined;
1416
+ }>;
1417
+ type GitConfig = z.infer<typeof GitConfigSchema>;
1409
1418
  /**
1410
1419
  * OpenSpecUI 配置 Schema
1411
1420
  *
@@ -1468,6 +1477,14 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1468
1477
  }, {
1469
1478
  trendPointLimit?: number | undefined;
1470
1479
  }>>;
1480
+ /** Git detail 配置 */
1481
+ git: z.ZodDefault<z.ZodObject<{
1482
+ diffEagerLineBudget: z.ZodDefault<z.ZodNumber>;
1483
+ }, "strip", z.ZodTypeAny, {
1484
+ diffEagerLineBudget: number;
1485
+ }, {
1486
+ diffEagerLineBudget?: number | undefined;
1487
+ }>>;
1471
1488
  }, "strip", z.ZodTypeAny, {
1472
1489
  theme: "light" | "dark" | "system";
1473
1490
  cli: {
@@ -1489,6 +1506,9 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1489
1506
  dashboard: {
1490
1507
  trendPointLimit: number;
1491
1508
  };
1509
+ git: {
1510
+ diffEagerLineBudget: number;
1511
+ };
1492
1512
  }, {
1493
1513
  theme?: "light" | "dark" | "system" | undefined;
1494
1514
  cli?: {
@@ -1510,6 +1530,9 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1510
1530
  dashboard?: {
1511
1531
  trendPointLimit?: number | undefined;
1512
1532
  } | undefined;
1533
+ git?: {
1534
+ diffEagerLineBudget?: number | undefined;
1535
+ } | undefined;
1513
1536
  }>;
1514
1537
  type OpenSpecUIConfig = z.infer<typeof OpenSpecUIConfigSchema>;
1515
1538
  type OpenSpecUIConfigUpdate = {
@@ -1522,6 +1545,7 @@ type OpenSpecUIConfigUpdate = {
1522
1545
  appBaseUrl?: OpenSpecUIConfig['appBaseUrl'];
1523
1546
  terminal?: Partial<TerminalConfig>;
1524
1547
  dashboard?: Partial<DashboardConfig>;
1548
+ git?: Partial<GitConfig>;
1525
1549
  };
1526
1550
  /** 默认配置(静态,用于测试和类型) */
1527
1551
  declare const DEFAULT_CONFIG: OpenSpecUIConfig;
@@ -2452,8 +2476,13 @@ interface GitEntryShell {
2452
2476
  entry: DashboardGitEntry | null;
2453
2477
  files: GitEntryFileSummary[];
2454
2478
  }
2479
+ interface GitEntryFiles {
2480
+ files: GitEntryFileSummary[];
2481
+ eagerFiles: GitEntryFilePatch[];
2482
+ eagerPatchLineBudget: number;
2483
+ eagerPatchLineCount: number;
2484
+ }
2455
2485
  interface GitEntryPatch {
2456
- entry: DashboardGitEntry | null;
2457
2486
  file: GitEntryFilePatch | null;
2458
2487
  }
2459
2488
  type GitPatchFile = GitEntryFilePatch;
@@ -2584,22 +2613,22 @@ declare const PtySessionInfoSchema: z.ZodObject<{
2584
2613
  closeTip: z.ZodOptional<z.ZodString>;
2585
2614
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2586
2615
  }, "strip", z.ZodTypeAny, {
2587
- id: string;
2588
2616
  command: string;
2589
2617
  args: string[];
2590
2618
  platform: "windows" | "macos" | "common";
2591
2619
  exitCode: number | null;
2592
2620
  title: string;
2621
+ id: string;
2593
2622
  isExited: boolean;
2594
2623
  closeTip?: string | undefined;
2595
2624
  closeCallbackUrl?: string | Record<string, string> | undefined;
2596
2625
  }, {
2597
- id: string;
2598
2626
  command: string;
2599
2627
  args: string[];
2600
2628
  platform: "windows" | "macos" | "common";
2601
2629
  exitCode: number | null;
2602
2630
  title: string;
2631
+ id: string;
2603
2632
  isExited: boolean;
2604
2633
  closeTip?: string | undefined;
2605
2634
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2860,22 +2889,22 @@ declare const PtyListResponseSchema: z.ZodObject<{
2860
2889
  closeTip: z.ZodOptional<z.ZodString>;
2861
2890
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2862
2891
  }, "strip", z.ZodTypeAny, {
2863
- id: string;
2864
2892
  command: string;
2865
2893
  args: string[];
2866
2894
  platform: "windows" | "macos" | "common";
2867
2895
  exitCode: number | null;
2868
2896
  title: string;
2897
+ id: string;
2869
2898
  isExited: boolean;
2870
2899
  closeTip?: string | undefined;
2871
2900
  closeCallbackUrl?: string | Record<string, string> | undefined;
2872
2901
  }, {
2873
- id: string;
2874
2902
  command: string;
2875
2903
  args: string[];
2876
2904
  platform: "windows" | "macos" | "common";
2877
2905
  exitCode: number | null;
2878
2906
  title: string;
2907
+ id: string;
2879
2908
  isExited: boolean;
2880
2909
  closeTip?: string | undefined;
2881
2910
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2883,12 +2912,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2883
2912
  }, "strip", z.ZodTypeAny, {
2884
2913
  type: "list";
2885
2914
  sessions: {
2886
- id: string;
2887
2915
  command: string;
2888
2916
  args: string[];
2889
2917
  platform: "windows" | "macos" | "common";
2890
2918
  exitCode: number | null;
2891
2919
  title: string;
2920
+ id: string;
2892
2921
  isExited: boolean;
2893
2922
  closeTip?: string | undefined;
2894
2923
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2896,12 +2925,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2896
2925
  }, {
2897
2926
  type: "list";
2898
2927
  sessions: {
2899
- id: string;
2900
2928
  command: string;
2901
2929
  args: string[];
2902
2930
  platform: "windows" | "macos" | "common";
2903
2931
  exitCode: number | null;
2904
2932
  title: string;
2933
+ id: string;
2905
2934
  isExited: boolean;
2906
2935
  closeTip?: string | undefined;
2907
2936
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3000,22 +3029,22 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3000
3029
  closeTip: z.ZodOptional<z.ZodString>;
3001
3030
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3002
3031
  }, "strip", z.ZodTypeAny, {
3003
- id: string;
3004
3032
  command: string;
3005
3033
  args: string[];
3006
3034
  platform: "windows" | "macos" | "common";
3007
3035
  exitCode: number | null;
3008
3036
  title: string;
3037
+ id: string;
3009
3038
  isExited: boolean;
3010
3039
  closeTip?: string | undefined;
3011
3040
  closeCallbackUrl?: string | Record<string, string> | undefined;
3012
3041
  }, {
3013
- id: string;
3014
3042
  command: string;
3015
3043
  args: string[];
3016
3044
  platform: "windows" | "macos" | "common";
3017
3045
  exitCode: number | null;
3018
3046
  title: string;
3047
+ id: string;
3019
3048
  isExited: boolean;
3020
3049
  closeTip?: string | undefined;
3021
3050
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3023,12 +3052,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3023
3052
  }, "strip", z.ZodTypeAny, {
3024
3053
  type: "list";
3025
3054
  sessions: {
3026
- id: string;
3027
3055
  command: string;
3028
3056
  args: string[];
3029
3057
  platform: "windows" | "macos" | "common";
3030
3058
  exitCode: number | null;
3031
3059
  title: string;
3060
+ id: string;
3032
3061
  isExited: boolean;
3033
3062
  closeTip?: string | undefined;
3034
3063
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3036,12 +3065,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3036
3065
  }, {
3037
3066
  type: "list";
3038
3067
  sessions: {
3039
- id: string;
3040
3068
  command: string;
3041
3069
  args: string[];
3042
3070
  platform: "windows" | "macos" | "common";
3043
3071
  exitCode: number | null;
3044
3072
  title: string;
3073
+ id: string;
3045
3074
  isExited: boolean;
3046
3075
  closeTip?: string | undefined;
3047
3076
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3067,4 +3096,4 @@ type PtyServerMessage = z.infer<typeof PtyServerMessageSchema>;
3067
3096
  type PtySessionInfo = z.infer<typeof PtySessionInfoSchema>;
3068
3097
  type PtyPlatform = z.infer<typeof PtyPlatformSchema>;
3069
3098
  //#endregion
3070
- export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, type CodeEditorTheme, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, type DashboardCardAvailability, type DashboardConfig, DashboardConfigSchema, type DashboardGitCommitEntry, type DashboardGitDiffStats, type DashboardGitEntry, type DashboardGitSnapshot, type DashboardGitUncommittedEntry, type DashboardGitWorktree, type DashboardMetricKey, type DashboardOverview, type DashboardSummary, type DashboardTrendKind, type DashboardTrendMeta, type DashboardTrendPoint, type DashboardTriColorTrendPoint, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type ExportSnapshot, type FileChangeEvent, type FileChangeType, type GitEntriesPage, type GitEntryCursor, type GitEntryDetail, type GitEntryFileDiff, type GitEntryFilePatch, type GitEntryFileSource, type GitEntryFileSummary, type GitEntryPatch, type GitEntrySelector, type GitEntryShell, type GitFileChangeType, type GitPatchFile, type GitPatchState, type GitWorktreeHandoff, type GitWorktreeOverview, type GitWorktreeSummary, type HostedAppChannelKind, type HostedAppChannelManifest, type HostedAppCompatibilityEntry, type HostedAppVersionManifest, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, PtyAttachMessageSchema, PtyBufferResponseSchema, type PtyClientMessage, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, type PtyPlatform, PtyPlatformSchema, PtyResizeMessageSchema, type PtyServerMessage, PtyServerMessageSchema, type PtySessionInfo, PtyTitleResponseSchema, ReactiveContext, ReactiveState, type ReactiveStateOptions, type Requirement, RequirementSchema, type ResolvedCliRunner, type SchemaArtifact, SchemaArtifactSchema, type SchemaDetail, SchemaDetailSchema, type SchemaInfo, SchemaInfoSchema, type SchemaResolution, SchemaResolutionSchema, type Spec, type SpecMeta, SpecSchema, TOOL_WORKFLOW_TO_SKILL_DIR, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, type ToolInitDelivery, type ToolInitState, type ToolInitStatus, type ToolWorkflowId, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, toOpsxDisplayPath };
3099
+ export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, type CodeEditorTheme, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, type DashboardCardAvailability, type DashboardConfig, DashboardConfigSchema, type DashboardGitCommitEntry, type DashboardGitDiffStats, type DashboardGitEntry, type DashboardGitSnapshot, type DashboardGitUncommittedEntry, type DashboardGitWorktree, type DashboardMetricKey, type DashboardOverview, type DashboardSummary, type DashboardTrendKind, type DashboardTrendMeta, type DashboardTrendPoint, type DashboardTriColorTrendPoint, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type ExportSnapshot, type FileChangeEvent, type FileChangeType, type GitConfig, GitConfigSchema, type GitEntriesPage, type GitEntryCursor, type GitEntryDetail, type GitEntryFileDiff, type GitEntryFilePatch, type GitEntryFileSource, type GitEntryFileSummary, type GitEntryFiles, type GitEntryPatch, type GitEntrySelector, type GitEntryShell, type GitFileChangeType, type GitPatchFile, type GitPatchState, type GitWorktreeHandoff, type GitWorktreeOverview, type GitWorktreeSummary, type HostedAppChannelKind, type HostedAppChannelManifest, type HostedAppCompatibilityEntry, type HostedAppVersionManifest, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, PtyAttachMessageSchema, PtyBufferResponseSchema, type PtyClientMessage, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, type PtyPlatform, PtyPlatformSchema, PtyResizeMessageSchema, type PtyServerMessage, PtyServerMessageSchema, type PtySessionInfo, PtyTitleResponseSchema, ReactiveContext, ReactiveState, type ReactiveStateOptions, type Requirement, RequirementSchema, type ResolvedCliRunner, type SchemaArtifact, SchemaArtifactSchema, type SchemaDetail, SchemaDetailSchema, type SchemaInfo, SchemaInfoSchema, type SchemaResolution, SchemaResolutionSchema, type Spec, type SpecMeta, SpecSchema, TOOL_WORKFLOW_TO_SKILL_DIR, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, type ToolInitDelivery, type ToolInitState, type ToolInitStatus, type ToolWorkflowId, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, toOpsxDisplayPath };
package/dist/index.mjs CHANGED
@@ -2344,6 +2344,8 @@ const TerminalConfigSchema = z.object({
2344
2344
  rendererEngine: z.string().default("xterm")
2345
2345
  });
2346
2346
  const DashboardConfigSchema = z.object({ trendPointLimit: z.number().int().min(20).max(500).default(100) });
2347
+ const DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET = 1e3;
2348
+ const GitConfigSchema = z.object({ diffEagerLineBudget: z.number().int().min(0).max(2e5).default(DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET) });
2347
2349
  const CodeEditorConfigSchema = z.object({ theme: CodeEditorThemeSchema.default("github") });
2348
2350
  /**
2349
2351
  * OpenSpecUI 配置 Schema
@@ -2359,7 +2361,8 @@ const OpenSpecUIConfigSchema = z.object({
2359
2361
  codeEditor: CodeEditorConfigSchema.default(CodeEditorConfigSchema.parse({})),
2360
2362
  appBaseUrl: z.string().default(""),
2361
2363
  terminal: TerminalConfigSchema.default(TerminalConfigSchema.parse({})),
2362
- dashboard: DashboardConfigSchema.default(DashboardConfigSchema.parse({}))
2364
+ dashboard: DashboardConfigSchema.default(DashboardConfigSchema.parse({})),
2365
+ git: GitConfigSchema.default(GitConfigSchema.parse({}))
2363
2366
  });
2364
2367
  /** 默认配置(静态,用于测试和类型) */
2365
2368
  const DEFAULT_CONFIG = {
@@ -2368,7 +2371,8 @@ const DEFAULT_CONFIG = {
2368
2371
  codeEditor: CodeEditorConfigSchema.parse({}),
2369
2372
  appBaseUrl: "",
2370
2373
  terminal: TerminalConfigSchema.parse({}),
2371
- dashboard: DashboardConfigSchema.parse({})
2374
+ dashboard: DashboardConfigSchema.parse({}),
2375
+ git: GitConfigSchema.parse({})
2372
2376
  };
2373
2377
  function areStringArraysEqual(left, right) {
2374
2378
  if (left === right) return true;
@@ -2419,6 +2423,9 @@ function toPersistedConfig(config, options = {}) {
2419
2423
  const dashboard = {};
2420
2424
  if (config.dashboard.trendPointLimit !== DEFAULT_CONFIG.dashboard.trendPointLimit) dashboard.trendPointLimit = config.dashboard.trendPointLimit;
2421
2425
  if (hasOwnEntries(dashboard)) persisted.dashboard = dashboard;
2426
+ const git = {};
2427
+ if (config.git.diffEagerLineBudget !== DEFAULT_CONFIG.git.diffEagerLineBudget) git.diffEagerLineBudget = config.git.diffEagerLineBudget;
2428
+ if (hasOwnEntries(git)) persisted.git = git;
2422
2429
  return persisted;
2423
2430
  }
2424
2431
  function isPersistedConfigEmpty(config) {
@@ -2505,6 +2512,10 @@ var ConfigManager = class {
2505
2512
  dashboard: {
2506
2513
  ...current.dashboard,
2507
2514
  ...config.dashboard
2515
+ },
2516
+ git: {
2517
+ ...current.git,
2518
+ ...config.git
2508
2519
  }
2509
2520
  });
2510
2521
  if (isPersistedConfigEmpty(persisted) && !fileExists) return;
@@ -4341,4 +4352,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4341
4352
  ]);
4342
4353
 
4343
4354
  //#endregion
4344
- export { AI_TOOLS, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SpecSchema, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, toOpsxDisplayPath };
4355
+ export { AI_TOOLS, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SpecSchema, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, toOpsxDisplayPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/core",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Core OpenSpec adapter and parser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -39,10 +39,10 @@
39
39
  "zod": "^3.24.1"
40
40
  },
41
41
  "devDependencies": {
42
- "@vitest/coverage-v8": "^2.1.9",
42
+ "@vitest/coverage-v8": "^4.1.0",
43
43
  "tsdown": "^0.16.6",
44
44
  "typescript": "^5.7.2",
45
- "vitest": "^2.1.8"
45
+ "vitest": "^4.1.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "typescript": "^5.0.0"