feat: update Makelore modules and conversations
This commit is contained in:
@@ -11,9 +11,8 @@ import {
|
||||
} from 'node:fs/promises';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join, sep } from 'node:path';
|
||||
import type { ProjectConfig, ProjectTemplateId } from '../../shared/project-config';
|
||||
import type { ProjectConfig } from '../../shared/project-config';
|
||||
import { createInitialProjectConfig, readProjectConfig } from './project-config';
|
||||
import { initializeWorksPackageTemplate } from './project-package-template';
|
||||
|
||||
type StagedProjectEntries = {
|
||||
directories: string[];
|
||||
@@ -27,7 +26,6 @@ export type ProjectDirectoryInitializationResult = {
|
||||
|
||||
export type ProjectDirectoryInitializationInput = {
|
||||
projectPath: string;
|
||||
templateId: ProjectTemplateId;
|
||||
defaultModel?: string | null;
|
||||
allowExistingDirectory: boolean;
|
||||
};
|
||||
@@ -226,18 +224,9 @@ export async function initializeProjectDirectory(
|
||||
try {
|
||||
stagingPath = await mkdtemp(join(tmpdir(), 'niancode-project-init-'));
|
||||
|
||||
try {
|
||||
await initializeWorksPackageTemplate(stagingPath, input.templateId);
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
`Project package template initialization failed: ${error instanceof Error ? error.message : String(error)}`,
|
||||
{ cause: error },
|
||||
);
|
||||
}
|
||||
|
||||
let config: ProjectConfig;
|
||||
try {
|
||||
config = await createInitialProjectConfig(stagingPath, input.templateId, {
|
||||
config = await createInitialProjectConfig(stagingPath, {
|
||||
defaultModel: input.defaultModel,
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user