sync latest local runtime changes
This commit is contained in:
@@ -68,6 +68,13 @@ function readStdin() {
|
||||
fs.writeFileSync(statePath, JSON.stringify(state));
|
||||
}
|
||||
|
||||
const isInitPrompt = input === '/init' || input.includes('You are running cc-web\'s /init for a Codex session.');
|
||||
|
||||
if (isInitPrompt) {
|
||||
const agentsPath = path.join(process.cwd(), 'AGENTS.md');
|
||||
fs.writeFileSync(agentsPath, '# AGENTS.md\n\nGenerated by mock Codex /init.\n');
|
||||
}
|
||||
|
||||
if (input === 'trigger codex context limit' && !state.compacted) {
|
||||
process.stdout.write(`${JSON.stringify({
|
||||
type: 'turn.failed',
|
||||
@@ -78,6 +85,8 @@ function readStdin() {
|
||||
|
||||
const responseText = input === '/compact'
|
||||
? 'Codex compact finished.'
|
||||
: isInitPrompt
|
||||
? 'Codex init finished.'
|
||||
: `Codex mock handled (${imageCount} image): ${input}`;
|
||||
|
||||
process.stdout.write(`${JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user