prior-cli 1.3.3 → 1.3.4
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/bin/prior.js +3 -40
- package/package.json +1 -1
package/bin/prior.js
CHANGED
|
@@ -568,7 +568,7 @@ async function startChat(opts = {}) {
|
|
|
568
568
|
terminal: true,
|
|
569
569
|
historySize: 100,
|
|
570
570
|
completer: line => {
|
|
571
|
-
const cmds = ['/help', '/clear', '/
|
|
571
|
+
const cmds = ['/help', '/clear', '/censored', '/uncensored', '/login', '/logout', '/exit'];
|
|
572
572
|
if (!line.startsWith('/')) return [[], line];
|
|
573
573
|
const hits = cmds.filter(cmd => cmd.startsWith(line));
|
|
574
574
|
return [hits, line];
|
|
@@ -599,7 +599,7 @@ async function startChat(opts = {}) {
|
|
|
599
599
|
console.log(c.ok(' ◉') + c.muted(' Agent mode ') + c.dim('· file web shell image prior-network'));
|
|
600
600
|
|
|
601
601
|
console.log(DIVIDER);
|
|
602
|
-
console.log(c.muted(' /help /clear /
|
|
602
|
+
console.log(c.muted(' /help /clear /censored /uncensored /exit'));
|
|
603
603
|
console.log(DIVIDER);
|
|
604
604
|
console.log('');
|
|
605
605
|
|
|
@@ -617,9 +617,7 @@ async function startChat(opts = {}) {
|
|
|
617
617
|
const SLASH_CMDS = [
|
|
618
618
|
{ cmd: '/help', desc: 'Show help' },
|
|
619
619
|
{ cmd: '/clear', desc: 'Clear screen' },
|
|
620
|
-
{ cmd: '/
|
|
621
|
-
{ cmd: '/tools', desc: 'List tools' },
|
|
622
|
-
{ cmd: '/censored', desc: 'Load standard model (qwen)' },
|
|
620
|
+
{ cmd: '/censored', desc: 'Load standard model (qwen)' },
|
|
623
621
|
{ cmd: '/uncensored', desc: 'Load uncensored model' },
|
|
624
622
|
{ cmd: '/usage', desc: 'Token usage today' },
|
|
625
623
|
{ cmd: '/learn', desc: 'Learn this directory → prior.md' },
|
|
@@ -759,39 +757,6 @@ async function startChat(opts = {}) {
|
|
|
759
757
|
console.log(c.warn(' ✓ Prior Uncensored Model Loaded\n'));
|
|
760
758
|
return loop();
|
|
761
759
|
|
|
762
|
-
case '/model':
|
|
763
|
-
if (args[0]) {
|
|
764
|
-
currentModel = args[0];
|
|
765
|
-
console.log(c.ok(` ✓ Model → ${currentModel}\n`));
|
|
766
|
-
} else {
|
|
767
|
-
console.log(c.muted(` Current model: ${currentModel || 'default'}\n`));
|
|
768
|
-
}
|
|
769
|
-
return loop();
|
|
770
|
-
|
|
771
|
-
case '/tools':
|
|
772
|
-
console.log('');
|
|
773
|
-
console.log(c.bold(' Tools available in agent mode\n'));
|
|
774
|
-
const tools = [
|
|
775
|
-
['file_read', 'Read a file'],
|
|
776
|
-
['file_write', 'Create or overwrite a file'],
|
|
777
|
-
['file_append', 'Append to a file'],
|
|
778
|
-
['file_list', 'List directory contents'],
|
|
779
|
-
['file_delete', 'Delete a file'],
|
|
780
|
-
['web_search', 'Search the web (Google)'],
|
|
781
|
-
['url_fetch', 'Fetch a webpage (Puppeteer)'],
|
|
782
|
-
['run_command', 'Execute a shell command'],
|
|
783
|
-
['clipboard_read', 'Read from clipboard'],
|
|
784
|
-
['clipboard_write', 'Write to clipboard'],
|
|
785
|
-
['generate_image', 'Generate an image (Prior Diffusion)'],
|
|
786
|
-
['prior_feed', 'Get Prior Network feed'],
|
|
787
|
-
['prior_profile', 'Get your Prior Network profile'],
|
|
788
|
-
];
|
|
789
|
-
tools.forEach(([name, desc]) => {
|
|
790
|
-
console.log(` ${c.brand('▸')} ${c.bold(name.padEnd(16))} ${c.muted(desc)}`);
|
|
791
|
-
});
|
|
792
|
-
console.log('');
|
|
793
|
-
return loop();
|
|
794
|
-
|
|
795
760
|
case '/learn': {
|
|
796
761
|
// Sanity check — warn if not a project directory
|
|
797
762
|
const cwdBase = path.basename(process.cwd()).toLowerCase();
|
|
@@ -946,8 +911,6 @@ Keep it under 350 words. Write prior.md now.`;
|
|
|
946
911
|
console.log(c.muted(' /clear ') + 'Clear screen');
|
|
947
912
|
console.log(c.muted(' /censored ') + 'Load standard model (qwen)');
|
|
948
913
|
console.log(c.muted(' /uncensored ') + 'Load uncensored model (dolphin)');
|
|
949
|
-
console.log(c.muted(' /model <name> ') + 'Switch to any specific model');
|
|
950
|
-
console.log(c.muted(' /tools ') + 'List available tools');
|
|
951
914
|
console.log(c.muted(' /usage ') + 'Token usage for today');
|
|
952
915
|
console.log(c.muted(' /learn ') + 'Scan directory and write prior.md context file');
|
|
953
916
|
console.log(c.muted(' /login ') + 'Sign in to a different account');
|