gaunt-sloth-assistant
Version:
> ⚠️ **`gaunt-sloth-assistant` has been renamed to [`gaunt-sloth`](https://www.npmjs.com/package/gaunt-sloth).** > The `1.5.x` series is the final release under the old name — active development continues under > the new package. To switch: > > ```bash >
24 lines • 1.09 kB
JavaScript
import { createInteractiveSession, } from '@gaunt-sloth/api/modules/interactiveSessionModule.js';
import { readChatPrompt } from '@gaunt-sloth/core/utils/llmUtils.js';
export function chatCommand(program, commandLineConfigOverrides) {
const sessionConfig = {
mode: 'chat',
readModePrompt: readChatPrompt,
description: 'Start an interactive chat session with Gaunt Sloth',
readyMessage: '\nGaunt Sloth is ready to chat. Type your prompt.',
exitMessage: "Type 'exit' or hit Ctrl+C to exit chat\n",
};
// Start chat when no command typed
program.action(async () => {
await createInteractiveSession(sessionConfig, commandLineConfigOverrides);
});
// Chat command
program
.command('chat')
.description('Start an interactive chat session with Gaunt Sloth')
.argument('[message]', 'Initial message to start the chat')
.action(async (message) => {
await createInteractiveSession(sessionConfig, commandLineConfigOverrides, message);
});
}
//# sourceMappingURL=chatCommand.js.map