mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-28 08:49:38 +02:00
rename klo to ktx
This commit is contained in:
parent
1a42152e6f
commit
3ce510b55b
704 changed files with 10205 additions and 10255 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { isKloSetupReady, runKloSetupReadyChangeMenu } from './setup-ready-menu.js';
|
||||
import type { KloSetupStatus } from './setup.js';
|
||||
import { isKtxSetupReady, runKtxSetupReadyChangeMenu } from './setup-ready-menu.js';
|
||||
import type { KtxSetupStatus } from './setup.js';
|
||||
|
||||
const readyStatus: KloSetupStatus = {
|
||||
const readyStatus: KtxSetupStatus = {
|
||||
project: { path: '/tmp/revenue', ready: true },
|
||||
llm: { backend: 'anthropic', ready: true, model: 'claude-sonnet-4-6' },
|
||||
embeddings: { backend: 'openai', ready: true, model: 'text-embedding-3-small', dimensions: 1536 },
|
||||
|
|
@ -14,25 +14,25 @@ const readyStatus: KloSetupStatus = {
|
|||
|
||||
describe('setup ready menu', () => {
|
||||
it('recognizes a ready setup only when required sections are ready', () => {
|
||||
expect(isKloSetupReady(readyStatus)).toBe(true);
|
||||
expect(isKloSetupReady({ ...readyStatus, embeddings: { ready: false } })).toBe(false);
|
||||
expect(isKloSetupReady({ ...readyStatus, context: { ready: false, status: 'not_started' } })).toBe(false);
|
||||
expect(isKloSetupReady({ ...readyStatus, agents: [] })).toBe(false);
|
||||
expect(isKtxSetupReady(readyStatus)).toBe(true);
|
||||
expect(isKtxSetupReady({ ...readyStatus, embeddings: { ready: false } })).toBe(false);
|
||||
expect(isKtxSetupReady({ ...readyStatus, context: { ready: false, status: 'not_started' } })).toBe(false);
|
||||
expect(isKtxSetupReady({ ...readyStatus, agents: [] })).toBe(false);
|
||||
});
|
||||
|
||||
it('maps ready-project menu choices to setup sections', async () => {
|
||||
const prompts = { select: vi.fn(async () => 'agents'), cancel: vi.fn() };
|
||||
|
||||
await expect(runKloSetupReadyChangeMenu(readyStatus, { prompts })).resolves.toEqual({ action: 'agents' });
|
||||
await expect(runKtxSetupReadyChangeMenu(readyStatus, { prompts })).resolves.toEqual({ action: 'agents' });
|
||||
|
||||
expect(prompts.select).toHaveBeenCalledWith({
|
||||
message: 'KLO is already set up for /tmp/revenue. What would you like to change?',
|
||||
message: 'KTX is already set up for /tmp/revenue. What would you like to change?',
|
||||
options: [
|
||||
{ value: 'models', label: 'Models' },
|
||||
{ value: 'embeddings', label: 'Embeddings' },
|
||||
{ value: 'databases', label: 'Primary sources' },
|
||||
{ value: 'sources', label: 'Context sources' },
|
||||
{ value: 'context', label: 'Rebuild KLO context' },
|
||||
{ value: 'context', label: 'Rebuild KTX context' },
|
||||
{ value: 'agents', label: 'Agent integration' },
|
||||
{ value: 'exit', label: 'Exit' },
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue