prompt logs cross platform
This commit is contained in:
parent
c388e47cd5
commit
e9bfccd278
2 changed files with 21 additions and 1 deletions
20
binary/prompt-logs.js
Normal file
20
binary/prompt-logs.js
Normal 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);
|
||||
});
|
||||
|
|
@ -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 && touch ./extensions/.continue-debug/logs/prompt.log && 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="" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue