Refactor CLI input handling in cli.js to streamline the input structure and enhance the OpenAI call process. Introduce a new variable for previous response tracking and update file listing in list_files.js to return sorted file entries directly, improving output consistency.
This commit is contained in:
@@ -173,7 +173,7 @@ export async function run(args) {
|
||||
const files = await listEntriesRecursive(resolvedBase, chrootResolved, depth === -1 ? Infinity : depth, includeHidden);
|
||||
return {
|
||||
cwd,
|
||||
files: JSON.stringify(files.sort((a, b) => a[0].localeCompare(b[0]))), // Sort for consistent output
|
||||
files: files.sort((a, b) => a[0].localeCompare(b[0])), // Sort for consistent output
|
||||
};
|
||||
} catch (err) {
|
||||
return { err: `Failed to list files: ${err?.message || String(err)}` };
|
||||
|
||||
Reference in New Issue
Block a user