const fs = require('fs');
const file = 'src/modules/book-generator/langgraph-generator.ts';
const lines = fs.readFileSync(file, 'utf8').split('\n');

// 修改第790行 - 搜索  
lines[789] = `    const searchTag = String.fromCharCode(60) + '/think' + String.fromCharCode(62);  // `;
lines[790] = `    const thinkEndIdx = cleanedStr.indexOf(searchTag);`;

fs.writeFileSync(file, lines.join('\n'), 'utf8');
console.log('✅ 第789-790行已修复');
console.log('新内容:');
console.log(lines[789]);
console.log(lines[790]);
