@@ -3090,7 +3090,7 @@ const logCommand = async (command, args) => {
3090
3090
// function to log preprefix
3091
3091
const logPrePrefix = async ( prePrefix ) => {
3092
3092
const currentPath = path . join ( logsFolderPath , 'current_logic.txt' ) ;
3093
- // const completePath = path.join(logsFolderPath, 'complete_log .txt');
3093
+ // const completePath = path.join(logsFolderPath, 'complete_logic .txt');
3094
3094
3095
3095
await createFolderIfNotExists ( logsFolderPath ) ;
3096
3096
@@ -3101,7 +3101,7 @@ const logPrePrefix = async (prePrefix) => {
3101
3101
// function to log prefix
3102
3102
const logPrefix = async ( prefix ) => {
3103
3103
const currentPath = path . join ( logsFolderPath , 'current_logic.txt' ) ;
3104
- // const completePath = path.join(logsFolderPath, 'complete_log .txt');
3104
+ // const completePath = path.join(logsFolderPath, 'complete_logic .txt');
3105
3105
3106
3106
await createFolderIfNotExists ( logsFolderPath ) ;
3107
3107
@@ -3112,7 +3112,7 @@ const logPrefix = async (prefix) => {
3112
3112
// function to log user input
3113
3113
const newLogic = async ( userInput ) => {
3114
3114
const currentPath = path . join ( logsFolderPath , 'current_logic.txt' ) ;
3115
- // const completePath = path.join(logsFolderPath, 'complete_log .txt');
3115
+ // const completePath = path.join(logsFolderPath, 'complete_logic .txt');
3116
3116
3117
3117
await createFolderIfNotExists ( logsFolderPath ) ;
3118
3118
@@ -3123,7 +3123,7 @@ const newLogic = async (userInput) => {
3123
3123
// function to log suffix
3124
3124
const logSuffix = async ( suffix ) => {
3125
3125
const currentPath = path . join ( logsFolderPath , 'current_logic.txt' ) ;
3126
- // const completePath = path.join(logsFolderPath, 'complete_log .txt');
3126
+ // const completePath = path.join(logsFolderPath, 'complete_logic .txt');
3127
3127
3128
3128
await createFolderIfNotExists ( logsFolderPath ) ;
3129
3129
@@ -3134,7 +3134,7 @@ const logSuffix = async (suffix) => {
3134
3134
// function to log semantic
3135
3135
// const logSemantic = async (semantic) => {
3136
3136
// const currentPath = path.join(logsFolderPath, 'current_logic.txt');
3137
- // const completePath = path.join(logsFolderPath, 'complete_log .txt');
3137
+ // const completePath = path.join(logsFolderPath, 'complete_logic .txt');
3138
3138
3139
3139
// await createFolderIfNotExists(logsFolderPath);
3140
3140
@@ -3490,19 +3490,21 @@ function saveMultiNotes() {
3490
3490
const selectedDropDown = dropDownOptions [ dropDown . selected ] ;
3491
3491
const { prePrefix, prefix, suffix } = await getPrefixSuffix ( selectedDropDown ) ;
3492
3492
const userInput = text ; // store user input in a separate variable
3493
- // await logPrePrefix(prePrefix);
3494
- // await logPrefix(prefix) ;
3495
- // await newLogic(userInput );
3496
- // await logSuffix(suffix);
3493
+
3494
+ const historyEnabled = historyCheckbox . checked ;
3495
+ const checkBoxPath = historyEnabled ? path . join ( logsFolderPath , 'complete_logic.txt' ) : path . join ( logsFolderPath , 'current_logic.txt' ) ;
3496
+
3497
3497
await logAll ( prePrefix , prefix , userInput , suffix ) ;
3498
+
3499
+ // await logAll(prePrefix, prefix, userInput, suffix);
3498
3500
const modelPath = path . join ( modelsFolder , selectedModel ) ;
3499
3501
if ( ! isValidModelPath ( modelPath ) ) {
3500
3502
outputBox . insertBottom ( 'Error: Invalid model path. Please select a .bin file.' ) ;
3501
3503
screen . render ( ) ;
3502
3504
return ;
3503
3505
}
3504
3506
3505
- const historyEnabled = historyCheckbox . checked ;
3507
+ // const historyEnabled = historyCheckbox.checked;
3506
3508
let gptInput = text ;
3507
3509
let gptOutput = '' ;
3508
3510
@@ -3592,14 +3594,15 @@ function saveMultiNotes() {
3592
3594
} else if ( radioSet . children [ 2 ] . checked ) {
3593
3595
args . push ( '--mirostat' , '2' ) ;
3594
3596
}
3595
- args . push ( '-p' , `${ gptInput } ` ) ;
3597
+ // args.push('-p', `${gptInput}`);
3598
+ // args.push('-f', currentPath);
3599
+ args . push ( '-f' , checkBoxPath ) ;
3596
3600
logCommand ( command , args ) ;
3597
3601
3598
3602
child = spawn ( command , args , { stdio : [ 'inherit' , 'pipe' , 'pipe' ] } ) ;
3599
3603
3600
3604
3601
3605
let output = '' ; // variable for saving the output
3602
- // let dialogHistory = ''; // variable for saving the dialogue course
3603
3606
let isFirstChunk = true ;
3604
3607
let formattedOutput = '' ;
3605
3608
@@ -3618,16 +3621,12 @@ child.stdout.on('data', (data) => {
3618
3621
3619
3622
// let formattedOutput;
3620
3623
if ( isFirstChunk ) {
3621
- // dialogHistory += `\n\nYou\n${text}\n\nAssistant${userOutput}\n`;
3622
-
3623
3624
// formattedOutput = `\n\u001b[1;30mYou\n\u001b[0m\u001b[1;90m${text}\u001b[0m\n\n\u001b[1;30mAssistant\u001b[0m\u001b[1;90m${userOutput}\n\u001b[0m`;
3624
3625
3625
3626
formattedOutput = `\n\nYou\n${ text } \n\nAssistant${ userOutput } \n` ;
3626
3627
3627
3628
isFirstChunk = false ;
3628
3629
} else {
3629
- // dialogHistory += `${userOutput}`;
3630
-
3631
3630
formattedOutput = `${ userOutput } ` ;
3632
3631
}
3633
3632
//
0 commit comments