@@ -244,8 +244,8 @@ func (th *TagHandler) handlePRReviewComment(
244
244
}
245
245
}
246
246
247
- // buildEnhancedIssuePrompt 为Issue中的/code命令构建增强提示词
248
- func (th * TagHandler ) buildEnhancedIssuePrompt (ctx context.Context , event * models.IssueCommentContext , args string ) (string , error ) {
247
+ // buildIssueCodePrompt 为Issue中的/code命令构建增强提示词
248
+ func (th * TagHandler ) buildIssueCodePrompt (ctx context.Context , event * models.IssueCommentContext , args string ) (string , error ) {
249
249
xl := xlog .NewWith (ctx )
250
250
251
251
// 收集Issue的完整上下文
@@ -442,8 +442,8 @@ func (th *TagHandler) executeIssueCodeProcessing(
442
442
return err
443
443
}
444
444
445
- // 3. 生成代码实现
446
- codeOutput , err := th .generateCodeImplementation (ctx , event , cmdInfo , ws , pcm )
445
+ // 3. 调用AI并生成代码实现
446
+ codeOutput , err := th .callAIAndGenerateCode (ctx , event , cmdInfo , ws , pcm )
447
447
if err != nil {
448
448
result = & models.ProgressExecutionResult {
449
449
Success : false ,
@@ -616,8 +616,8 @@ func (th *TagHandler) initializeProgressTracking(
616
616
return pcm , nil
617
617
}
618
618
619
- // generateCodeImplementation 生成代码实现
620
- func (th * TagHandler ) generateCodeImplementation (
619
+ // callAIAndGenerateCode 调用AI并生成代码实现
620
+ func (th * TagHandler ) callAIAndGenerateCode (
621
621
ctx context.Context ,
622
622
event * models.IssueCommentContext ,
623
623
cmdInfo * models.CommandInfo ,
@@ -639,8 +639,8 @@ func (th *TagHandler) generateCodeImplementation(
639
639
}
640
640
xl .Infof ("Code client initialized successfully" )
641
641
642
- // 构建提示词
643
- codePrompt , err := th .buildCodePrompt (ctx , event , cmdInfo )
642
+ // 构建AI提示词
643
+ codePrompt , err := th .buildAIPromptForCode (ctx , event , cmdInfo )
644
644
if err != nil {
645
645
xl .Warnf ("Failed to build enhanced prompt, falling back to simple prompt: %v" , err )
646
646
codePrompt = th .buildFallbackPrompt (event )
@@ -676,13 +676,13 @@ func (th *TagHandler) generateCodeImplementation(
676
676
return codeOutput , nil
677
677
}
678
678
679
- // buildCodePrompt 构建代码生成提示词
680
- func (th * TagHandler ) buildCodePrompt (
679
+ // buildAIPromptForCode 构建AI代码生成提示词
680
+ func (th * TagHandler ) buildAIPromptForCode (
681
681
ctx context.Context ,
682
682
event * models.IssueCommentContext ,
683
683
cmdInfo * models.CommandInfo ,
684
684
) (string , error ) {
685
- return th .buildEnhancedIssuePrompt (ctx , event , cmdInfo .Args )
685
+ return th .buildIssueCodePrompt (ctx , event , cmdInfo .Args )
686
686
}
687
687
688
688
// buildFallbackPrompt 构建备用提示词
0 commit comments