feat: 实装AI改写结局功能 - 接入DeepSeek API - AI动态生成新结局名称 - 新增rewrite类型结局样式 - 修复请求超时问题

This commit is contained in:
2026-03-05 15:57:51 +08:00
parent 89b5a3b658
commit d47ccd7039
11 changed files with 513 additions and 15 deletions

View File

@@ -538,6 +538,21 @@ export default class StoryScene extends BaseScene {
if (this.waitingForClick) {
this.waitingForClick = false;
// AI改写内容 - 直接跳转到新结局
if (this.aiContent && this.aiContent.is_ending) {
console.log('AI改写内容:', JSON.stringify(this.aiContent));
this.main.sceneManager.switchScene('ending', {
storyId: this.storyId,
ending: {
name: this.aiContent.ending_name,
type: this.aiContent.ending_type,
content: this.aiContent.content,
score: 100
}
});
return;
}
// 检查是否是结局
if (this.main.storyManager.isEnding()) {
this.main.sceneManager.switchScene('ending', {