prompt logs cross platform

This commit is contained in:
= 2025-02-28 17:45:13 -08:00
parent c388e47cd5
commit e9bfccd278
2 changed files with 21 additions and 1 deletions

20
binary/prompt-logs.js Normal file
View file

@ -0,0 +1,20 @@
const fs = require('fs');
const path = require('path');
const logDirPath = path.join(__dirname, '..', 'extensions', '.continue-debug', 'logs');
const logFilePath = path.join(logDirPath, "prompt.log");
if (!fs.existsSync(logDirPath)) {
fs.mkdirSync(logDirPath, { recursive: true });
}
if (!fs.existsSync(logFilePath)) {
fs.createWriteStream(logFilePath).end();
}
console.log("Watching logs at " + logFilePath)
fs.watch(logFilePath, () => {
// console.clear();
fs.createReadStream(logFilePath).pipe(process.stdout);
});

View file

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Prompt Logs" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="mkdir -p ./extensions/.continue-debug/logs &amp;&amp; touch ./extensions/.continue-debug/logs/prompt.log &amp;&amp; tail -f ./extensions/.continue-debug/logs/prompt.log" />
<option name="SCRIPT_TEXT" value="node ./binary/prompt-logs.js" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />