Skip to content

Commit b7f3431

Browse files
author
mmiscool
committed
build: refactoring and added new UI docs
1 parent dab25df commit b7f3431

13 files changed

+32
-29
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ With **aiCoder** as your coding co-pilot, you’ll streamline development, refin
77

88
The real magic? aiCoder’s advanced merging keeps your code intact, seamlessly integrating new snippets with precision and reliability.
99

10+
## SCREEN SHOTS OF THE NEW UI
11+
![NEW UI](<./images/newUI.png>)
12+
13+
![NEW TOOLS](<./images/TOOLS.png>)
14+
15+
![NEW LLM SETTINGS](<./images/LLM_SETUP.png>)
16+
17+
1018
## UNSTABLE
1119
This project is going to be in a state of flux for a while. Settings and prompt files may need to be recreated after updates as more settings are added and files are renamed.
1220

Screenshot 2024-11-30 160204.png

84.3 KB
Loading

images/LLM_SETUP.png

46.4 KB
Loading

images/TOOLS.png

153 KB
Loading

images/newUI.png

84.3 KB
Loading

public/ChatManager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ export class ChatManager {
153153
await this.pullMessages();
154154
}
155155

156+
157+
156158
async addCodeToolbars() {
157159
// Query all <code> elements on the page
158160

src/aiAssistedCodeChanges.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export async function aiAssistedCodeChanges(premade_llmInstructionPrompt = null,
3232
// Loop for conversation with the AI
3333
while (true) {
3434

35-
console.log(`Editing: '${ctx.targetFile}'`);
36-
console.log("q to quit, Enter to continue");
35+
printAndPause(`Editing: '${ctx.targetFile}'`);
36+
printAndPause("q to quit, Enter to continue");
3737
let llmInstructionPrompt = premade_llmInstructionPrompt || await input("What would you like me to do?");
3838

3939
if (llmInstructionPrompt === '') break;
@@ -109,7 +109,7 @@ export async function applySnippets(snippets, skipApprovingChanges = false) {
109109

110110
// append the snippets to the code
111111
//await appendFile(ctx.targetFile, '\n\n\n\n\n' + cleanedSnippets);
112-
console.log('Changes applied');
112+
printAndPause('Changes applied');
113113

114114
const manipulator = new codeManipulator(ctx.targetFile);
115115
await manipulator.mergeCode(cleanedSnippets);

src/aiCoderApiFunctions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getMethodsWithArguments } from "./classListing.js";
33
import { readFile, readOrLoadFromDefault, writeFile } from "./fileIO.js";
44
import { conversation, llmSettings, llmSettingsUpdate } from "./llmCall.js";
55
import { ctx } from "./main.js";
6-
import { launchNano } from "./terminalHelpers.js";
6+
import { launchNano, printAndPause } from "./terminalHelpers.js";
77

88

99
let webUIConversation = new conversation();
@@ -62,7 +62,7 @@ You will not change the plan title if it already has one.
6262
}
6363

6464
async callLLM() {
65-
console.log('callLLM');
65+
printAndPause('callLLM');
6666
await webUIConversation.callLLM();
6767
const response = await webUIConversation.getMessages();
6868
return response;
@@ -75,7 +75,6 @@ You will not change the plan title if it already has one.
7575

7676
async getMethodsList() {
7777
const response = await getMethodsWithArguments(await readFile(ctx.targetFile));
78-
//console.log('getMethodsList', response);
7978
return response;
8079
}
8180

src/debugging.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/fileIO.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import fs from 'fs';
22
import path, { relative, dirname } from 'path';
3-
import { printDebugMessage } from './debugging.js';
43
import { createBackup } from './backupSystem.js';
5-
import { pressEnterToContinue, printAndPause } from './terminalHelpers.js';
4+
import { pressEnterToContinue, printAndPause, printDebugMessage } from './terminalHelpers.js';
65
import { fileURLToPath } from 'url';
76

87
// Helper functions to read, write, and append to files
@@ -25,10 +24,10 @@ export async function readFile(filePath) {
2524

2625
export async function writeFile(filePath, content, makeBackup = false) {
2726
if (typeof content !== 'string') {
28-
await printAndPause('Content is not a string:',0);
29-
await printAndPause(content,0);
27+
await printAndPause('Content is not a string:', 0);
28+
await printAndPause(content, 0);
3029
await pressEnterToContinue();
31-
30+
3231
}
3332
// create the folders in the file path if they don't exist
3433
let folderPath = path.dirname(filePath);

0 commit comments

Comments
 (0)