@vierratale/ai 0.1.0-beta.4 → 0.1.0-beta.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vierratale/ai",
3
- "version": "0.1.0-beta.4",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "VierrataleAI - Intelligent terminal assistant",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -85,6 +85,7 @@ async function answerWithSearch(messages, provider, query, systemPrompt) {
85
85
  if (response) {
86
86
  messages.push({ role: 'assistant', content: response });
87
87
  }
88
+ Session.save(messages);
88
89
  }
89
90
 
90
91
  async function chat(provider, systemPrompt) {
@@ -190,7 +191,13 @@ async function chat(provider, systemPrompt) {
190
191
  const prov = cmd.split(' ')[1];
191
192
  if (['cortex', 'openai'].includes(prov)) {
192
193
  Config.save({ provider: prov });
193
- Terminal.printSuccess(`Provider: ${prov}`);
194
+ const next = ProviderFactory.create(prov);
195
+ if (next && await next.isAvailable()) {
196
+ provider = next;
197
+ Terminal.printSuccess(`Provider: ${prov}`);
198
+ } else {
199
+ Terminal.printWarning(`Provider saved, but ${prov} is not available right now. Will apply on restart.`);
200
+ }
194
201
  } else {
195
202
  Terminal.printError(`Unknown provider: ${prov}`);
196
203
  }
package/src/installer.js CHANGED
@@ -17,15 +17,16 @@ function isEngineRunning(host) {
17
17
 
18
18
  function isEngineInstalled() {
19
19
  try {
20
- execSync('which cortex 2>/dev/null', { stdio: 'ignore' });
20
+ execSync('which ollama 2>/dev/null', { stdio: 'ignore' });
21
21
  return true;
22
22
  } catch {}
23
- const paths = ['/usr/local/bin/cortex', '/usr/bin/cortex'];
23
+ const paths = ['/usr/local/bin/ollama', '/usr/bin/ollama'];
24
24
  return paths.some((p) => existsSync(p));
25
25
  }
26
26
 
27
27
  async function installEngine() {
28
- await runSilent('curl -fsSL https://cortex.com/install.sh | sh');
28
+ await runSilent('curl -fsSL https://ollama.com/install.sh | sh');
29
+ return isEngineInstalled();
29
30
  }
30
31
 
31
32
  async function pullModel(host, model) {
@@ -64,7 +65,7 @@ export const Installer = {
64
65
  const running = await isEngineRunning(host);
65
66
  if (!running) {
66
67
  try {
67
- execSync('cortex serve &', { stdio: 'ignore' });
68
+ execSync('ollama serve &', { stdio: 'ignore' });
68
69
  await new Promise((r) => setTimeout(r, 3000));
69
70
  } catch {}
70
71
  }
@@ -1,6 +1,6 @@
1
1
  export const Branding = {
2
2
  APP_NAME: 'VierrataleAI',
3
- VERSION: '0.1.0-beta.4',
3
+ VERSION: '0.1.0-beta.5',
4
4
 
5
5
  colors: {
6
6
  primary: '\x1b[38;2;124;58;237m',
@@ -14,14 +14,13 @@ export const Branding = {
14
14
  },
15
15
 
16
16
  BANNER: [
17
- '',
18
- ' ██╗ ██╗██╗██████╗ ███████╗',
19
- ' ██║ ██║██║██╔══██╗██╔════╝',
20
- ' ██║ ██║██║██████╔╝█████╗ ',
21
- ' ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ',
22
- ' ╚████╔╝ ██║██████╔╝███████╗',
23
- ' ╚═══╝ ╚═╝╚═════╝ ╚══════╝',
24
- '',
17
+ ' _',
18
+ ' _ _ _ / \\ _______',
19
+ ' | | | | / _ \\\\_ _ /',
20
+ ' | | | |_ ___ _ __ _ __ __ _/ /_\\ \\ | | ',
21
+ ' | | | | |/ _ \\ \'__| \'__/ _` | _ | | | ',
22
+ ' \\ \\_/ / | __/ | | | | (_| | | | |_| |_ ',
23
+ ' \\___/|_|\\___|_| |_| \\__,_|_| |_/\\___/ ',
25
24
  ].join('\n'),
26
25
 
27
26
  USER_PROMPT: 'You',