Skip to content

Commit

Permalink
update fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHallen122 committed Nov 17, 2024
1 parent 8438e04 commit 9dca6c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/src/build-system/node/ux_sitemap_document/uxsmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,27 @@ export class UXSMDHandler implements BuildHandler {
readonly id = 'op:UXSMD::STATE:GENERATE';
readonly logger: Logger = new Logger('UXSMDHandler');

async run(context: BuilderContext): Promise<BuildResult> {
async run(context: BuilderContext, args: unknown): Promise<BuildResult> {
this.logger.log('Generating UXSMD...');

// Extract project data from the context
const projectName =
context.getData('projectName') || 'Default Project Name';
const prdDocument = context.getData('prdDocument') || 'Default prdDocument';
const platform = context.getData('platform') || 'Default Platform';

// Generate the prompt dynamically
const prompt = prompts.generateUxsmdrompt(
projectName,
prdDocument,
args as string,
platform,
);

// Send the prompt to the LLM server and process the response
const uxsmdContent = await this.generateUXSMDFromLLM(prompt);

// Store the generated document in the context
context.setData('uxsmdDocument', uxsmdContent);

return {
success: true,
data: uxsmdContent,
Expand Down

0 comments on commit 9dca6c5

Please sign in to comment.