@steipete/oracle 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/bin/oracle-cli.js +4 -1
- package/dist/src/cli/help.js +1 -1
- package/dist/src/cli/sessionDisplay.js +0 -1
- package/dist/src/oracle/run.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/bin/oracle-cli.js
CHANGED
|
@@ -39,7 +39,10 @@ program.hook('preAction', (thisCommand) => {
|
|
|
39
39
|
thisCommand.setOptionValue('prompt', positional);
|
|
40
40
|
}
|
|
41
41
|
if (shouldRequirePrompt(rawCliArgs, opts)) {
|
|
42
|
-
|
|
42
|
+
console.log(chalk.yellow('Prompt is required. Provide it via --prompt "<text>" or positional [prompt].'));
|
|
43
|
+
thisCommand.help({ error: false });
|
|
44
|
+
process.exitCode = 1;
|
|
45
|
+
return;
|
|
43
46
|
}
|
|
44
47
|
});
|
|
45
48
|
program
|
package/dist/src/cli/help.js
CHANGED
|
@@ -47,7 +47,7 @@ function renderHelpFooter(program, colors) {
|
|
|
47
47
|
`${colors.bullet('•')} The model has no built-in knowledge of your project—open with the architecture, key components, and why you’re asking.`,
|
|
48
48
|
`${colors.bullet('•')} Run ${colors.accent('--files-report')} to inspect token spend before hitting the API.`,
|
|
49
49
|
`${colors.bullet('•')} Non-preview runs spawn detached sessions so they keep streaming even if your terminal closes — reattach anytime via ${colors.accent('pnpm oracle session <slug>')}.`,
|
|
50
|
-
`${colors.bullet('•')}
|
|
50
|
+
`${colors.bullet('•')} Set a memorable 3–5 word slug via ${colors.accent('--slug "<words>"')} to keep session IDs tidy.`,
|
|
51
51
|
`${colors.bullet('•')} Need hidden flags? Run ${colors.accent(`${program.name()} --help --verbose`)} to list search/token/browser overrides.`,
|
|
52
52
|
].join('\n');
|
|
53
53
|
const formatExample = (command, description) => `${colors.command(` ${command}`)}\n${colors.muted(` ${description}`)}`;
|
|
@@ -51,7 +51,6 @@ export async function attachSession(sessionId, options) {
|
|
|
51
51
|
}
|
|
52
52
|
const initialStatus = metadata.status;
|
|
53
53
|
if (!options?.suppressMetadata) {
|
|
54
|
-
console.log(chalk.bold(`Session: ${sessionId}`));
|
|
55
54
|
const reattachLine = buildReattachLine(metadata);
|
|
56
55
|
if (reattachLine) {
|
|
57
56
|
console.log(chalk.blue(reattachLine));
|
package/dist/src/oracle/run.js
CHANGED
|
@@ -92,7 +92,11 @@ export async function runOracle(options, deps = {}) {
|
|
|
92
92
|
logVerbose(`Estimated tokens (prompt + files): ${estimatedInputTokens.toLocaleString()}`);
|
|
93
93
|
const fileCount = files.length;
|
|
94
94
|
const cliVersion = getCliVersion();
|
|
95
|
-
const
|
|
95
|
+
const richTty = process.stdout.isTTY && chalk.level > 0;
|
|
96
|
+
const headerModelLabel = richTty ? chalk.cyan(modelConfig.model) : modelConfig.model;
|
|
97
|
+
const tokenLabel = richTty ? chalk.green(estimatedInputTokens.toLocaleString()) : estimatedInputTokens.toLocaleString();
|
|
98
|
+
const fileLabel = richTty ? chalk.magenta(fileCount.toString()) : fileCount.toString();
|
|
99
|
+
const headerLine = `Oracle (${cliVersion}) consulting ${headerModelLabel}'s crystal ball with ${tokenLabel} tokens and ${fileLabel} files...`;
|
|
96
100
|
const shouldReportFiles = (options.filesReport || fileTokenInfo.totalTokens > inputTokenBudget) && fileTokenInfo.stats.length > 0;
|
|
97
101
|
if (!isPreview) {
|
|
98
102
|
log(headerLine);
|
|
@@ -145,6 +149,7 @@ export async function runOracle(options, deps = {}) {
|
|
|
145
149
|
let answerHeaderPrinted = false;
|
|
146
150
|
const ensureAnswerHeader = () => {
|
|
147
151
|
if (!options.silent && !answerHeaderPrinted) {
|
|
152
|
+
log('');
|
|
148
153
|
log(chalk.bold('Answer:'));
|
|
149
154
|
answerHeaderPrinted = true;
|
|
150
155
|
}
|
|
@@ -325,7 +330,7 @@ async function executeBackgroundResponse(params) {
|
|
|
325
330
|
isActive: () => heartbeatActive,
|
|
326
331
|
makeMessage: (elapsedMs) => {
|
|
327
332
|
const elapsedText = formatElapsed(elapsedMs);
|
|
328
|
-
return `OpenAI background run still in progress — ${elapsedText} elapsed
|
|
333
|
+
return `OpenAI background run still in progress — ${elapsedText} elapsed.`;
|
|
329
334
|
},
|
|
330
335
|
});
|
|
331
336
|
}
|
package/package.json
CHANGED