Merge pull request #643 from AutoMaker-Org/feature/v0.14.0rc-1768981415660-tt2v

feat: add import / export features in json / yaml format
This commit is contained in:
Shirone
2026-01-21 23:06:10 +00:00
committed by GitHub
18 changed files with 2473 additions and 10 deletions

View File

@@ -1688,6 +1688,64 @@ export class HttpApiClient implements ElectronAPI {
results?: Array<{ featureId: string; success: boolean; error?: string }>;
error?: string;
}>;
export: (
projectPath: string,
options?: {
featureIds?: string[];
format?: 'json' | 'yaml';
includeHistory?: boolean;
includePlanSpec?: boolean;
category?: string;
status?: string;
prettyPrint?: boolean;
metadata?: Record<string, unknown>;
}
) => Promise<{
success: boolean;
data?: string;
format?: 'json' | 'yaml';
contentType?: string;
filename?: string;
error?: string;
}>;
import: (
projectPath: string,
data: string,
options?: {
overwrite?: boolean;
preserveBranchInfo?: boolean;
targetCategory?: string;
}
) => Promise<{
success: boolean;
importedCount?: number;
failedCount?: number;
results?: Array<{
success: boolean;
featureId?: string;
importedAt: string;
warnings?: string[];
errors?: string[];
wasOverwritten?: boolean;
}>;
error?: string;
}>;
checkConflicts: (
projectPath: string,
data: string
) => Promise<{
success: boolean;
hasConflicts?: boolean;
conflicts?: Array<{
featureId: string;
title?: string;
existingTitle?: string;
hasConflict: boolean;
}>;
totalFeatures?: number;
conflictCount?: number;
error?: string;
}>;
} = {
getAll: (projectPath: string) => this.post('/api/features/list', { projectPath }),
get: (projectPath: string, featureId: string) =>
@@ -1720,6 +1778,64 @@ export class HttpApiClient implements ElectronAPI {
this.post('/api/features/bulk-update', { projectPath, featureIds, updates }),
bulkDelete: (projectPath: string, featureIds: string[]) =>
this.post('/api/features/bulk-delete', { projectPath, featureIds }),
export: (
projectPath: string,
options?: {
featureIds?: string[];
format?: 'json' | 'yaml';
includeHistory?: boolean;
includePlanSpec?: boolean;
category?: string;
status?: string;
prettyPrint?: boolean;
metadata?: Record<string, unknown>;
}
): Promise<{
success: boolean;
data?: string;
format?: 'json' | 'yaml';
contentType?: string;
filename?: string;
error?: string;
}> => this.post('/api/features/export', { projectPath, ...options }),
import: (
projectPath: string,
data: string,
options?: {
overwrite?: boolean;
preserveBranchInfo?: boolean;
targetCategory?: string;
}
): Promise<{
success: boolean;
importedCount?: number;
failedCount?: number;
results?: Array<{
success: boolean;
featureId?: string;
importedAt: string;
warnings?: string[];
errors?: string[];
wasOverwritten?: boolean;
}>;
error?: string;
}> => this.post('/api/features/import', { projectPath, data, ...options }),
checkConflicts: (
projectPath: string,
data: string
): Promise<{
success: boolean;
hasConflicts?: boolean;
conflicts?: Array<{
featureId: string;
title?: string;
existingTitle?: string;
hasConflict: boolean;
}>;
totalFeatures?: number;
conflictCount?: number;
error?: string;
}> => this.post('/api/features/check-conflicts', { projectPath, data }),
};
// Auto Mode API