mirror of https://github.com/buster-so/buster.git
organized files
This commit is contained in:
parent
bbfdb5794e
commit
f9df968a15
|
@ -1,6 +1,6 @@
|
|||
import { program as commander } from 'commander';
|
||||
import { render } from 'ink';
|
||||
import { Main } from '../commands/main';
|
||||
import { Main } from '../commands/main/main';
|
||||
import { getCurrentVersion } from '../commands/update/update-handler';
|
||||
import { setupPreActionHook } from './hooks';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
deleteCredentials,
|
||||
loadCredentials,
|
||||
saveCredentials,
|
||||
} from '../utils/credentials';
|
||||
} from '../../utils/credentials';
|
||||
|
||||
interface AuthProps {
|
||||
apiKey?: string;
|
|
@ -34,7 +34,7 @@ export function createAuthCommand(): Command {
|
|||
// If we have an API key in CI, just validate and save it without interactive UI
|
||||
if (isCIEnvironment && (options.apiKey || process.env.BUSTER_API_KEY)) {
|
||||
const { createBusterSDK } = await import('@buster/sdk');
|
||||
const { saveCredentials } = await import('../utils/credentials');
|
||||
const { saveCredentials } = await import('../../utils/credentials');
|
||||
|
||||
const apiKey = options.apiKey || process.env.BUSTER_API_KEY;
|
||||
const host =
|
|
@ -1,9 +1,9 @@
|
|||
import type { Command } from 'commander';
|
||||
import { createAuthCommand } from './auth-command';
|
||||
import { createDeployCommand } from './deploy-command';
|
||||
import { createInitCommand } from './init-command';
|
||||
import { createSettingsCommand } from './settings-command';
|
||||
import { createUpdateCommand } from './update-command';
|
||||
import { createAuthCommand } from './auth';
|
||||
import { createDeployCommand } from './deploy';
|
||||
import { createInitCommand } from './init';
|
||||
import { createSettingsCommand } from './settings';
|
||||
import { createUpdateCommand } from './update';
|
||||
|
||||
/**
|
||||
* Registers all CLI subcommands with the program
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Command } from 'commander';
|
||||
import { render } from 'ink';
|
||||
import { DeployCommand } from './deploy/deploy';
|
||||
import { DeployOptionsSchema } from './deploy/schemas';
|
||||
import { DeployCommand } from './deploy';
|
||||
import { DeployOptionsSchema } from './schemas';
|
||||
|
||||
/**
|
||||
* Creates the deploy command for deploying semantic models
|
||||
|
@ -32,13 +32,13 @@ export function createDeployCommand(): Command {
|
|||
render(<DeployCommand {...parsedOptions} />);
|
||||
} else {
|
||||
// Direct execution for cleaner CLI output
|
||||
const { deployHandler } = await import('./deploy/deploy-handler.js');
|
||||
const { deployHandler } = await import('./deploy-handler.js');
|
||||
await deployHandler(parsedOptions);
|
||||
}
|
||||
} catch (error) {
|
||||
// Import the error formatter and type guard
|
||||
const { isDeploymentValidationError, formatDeployError, getExitCode } = await import(
|
||||
'./deploy/utils/errors.js'
|
||||
'./utils/errors.js'
|
||||
);
|
||||
|
||||
// Check if it's a DeploymentValidationError to handle it specially
|
|
@ -5,8 +5,8 @@ import { Box, Text, useApp, useInput } from 'ink';
|
|||
import Spinner from 'ink-spinner';
|
||||
import TextInput from 'ink-text-input';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { BusterBanner } from '../components/banner';
|
||||
import { type Credentials, getCredentials, saveCredentials } from '../utils/credentials';
|
||||
import { BusterBanner } from '../../components/banner';
|
||||
import { type Credentials, getCredentials, saveCredentials } from '../../utils/credentials';
|
||||
|
||||
interface InitProps {
|
||||
apiKey?: string;
|
|
@ -8,19 +8,19 @@ import {
|
|||
ChatTitle,
|
||||
ChatVersionTagline,
|
||||
VimStatus,
|
||||
} from '../components/chat-layout';
|
||||
import { HistoryBrowser } from '../components/history-browser';
|
||||
import { AgentMessageComponent } from '../components/message';
|
||||
import { SettingsForm } from '../components/settings-form';
|
||||
import { ExpansionContext } from '../hooks/use-expansion';
|
||||
import type { CliAgentMessage } from '../services/analytics-engineer-handler';
|
||||
import type { Conversation } from '../utils/conversation-history';
|
||||
import { loadConversation, saveModelMessages } from '../utils/conversation-history';
|
||||
import { getCurrentChatId, initNewSession, setSessionChatId } from '../utils/session';
|
||||
import { getSetting } from '../utils/settings';
|
||||
import type { SlashCommand } from '../utils/slash-commands';
|
||||
import { transformModelMessagesToUI } from '../utils/transform-messages';
|
||||
import type { VimMode } from '../utils/vim-mode';
|
||||
} from '../../components/chat-layout';
|
||||
import { HistoryBrowser } from '../../components/history-browser';
|
||||
import { AgentMessageComponent } from '../../components/message';
|
||||
import { SettingsForm } from '../../components/settings-form';
|
||||
import { ExpansionContext } from '../../hooks/use-expansion';
|
||||
import type { CliAgentMessage } from '../../services/analytics-engineer-handler';
|
||||
import type { Conversation } from '../../utils/conversation-history';
|
||||
import { loadConversation, saveModelMessages } from '../../utils/conversation-history';
|
||||
import { getCurrentChatId, initNewSession, setSessionChatId } from '../../utils/session';
|
||||
import { getSetting } from '../../utils/settings';
|
||||
import type { SlashCommand } from '../../utils/slash-commands';
|
||||
import { transformModelMessagesToUI } from '../../utils/transform-messages';
|
||||
import type { VimMode } from '../../utils/vim-mode';
|
||||
|
||||
type AppMode = 'Planning' | 'Auto-accept' | 'None';
|
||||
|
||||
|
@ -138,7 +138,7 @@ export function Main() {
|
|||
await saveModelMessages(chatId, cwd, updatedModelMessages);
|
||||
|
||||
// Import and run the analytics engineer agent
|
||||
const { runAnalyticsEngineerAgent } = await import('../services/analytics-engineer-handler');
|
||||
const { runAnalyticsEngineerAgent } = await import('../../services/analytics-engineer-handler');
|
||||
|
||||
// Create AbortController for this agent execution
|
||||
const abortController = new AbortController();
|
|
@ -1,6 +1,6 @@
|
|||
import { Box, Text } from 'ink';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { getSetting, setSetting, toggleSetting } from '../utils/settings';
|
||||
import { getSetting, setSetting, toggleSetting } from '../../utils/settings';
|
||||
|
||||
interface SettingsCommandProps {
|
||||
vimMode?: boolean;
|
|
@ -1,6 +1,6 @@
|
|||
import { Command } from 'commander';
|
||||
import { render } from 'ink';
|
||||
import { UpdateCommand } from './update/index';
|
||||
import { UpdateCommand } from './update';
|
||||
|
||||
/**
|
||||
* Creates the update command for updating the CLI to the latest version
|
|
@ -13,3 +13,4 @@ export {
|
|||
updateHandler,
|
||||
} from './update-handler';
|
||||
export { type UpdateOptions, UpdateOptionsSchema, type UpdateResult } from './update-schemas';
|
||||
export { createUpdateCommand } from './command';
|
||||
|
|
Loading…
Reference in New Issue