mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
fix(cli): respect --skills-dir in interactive mode (#1457)
The interactive shell entry point dropped opts.skillsDirs when building the harness, so --skills-dir only took effect in prompt mode. Forward it so the flag works in the TUI as documented.
This commit is contained in:
parent
6916240ae3
commit
260a80793a
3 changed files with 34 additions and 0 deletions
5
.changeset/fix-skills-dir-in-interactive-mode.md
Normal file
5
.changeset/fix-skills-dir-in-interactive-mode.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@moonshot-ai/kimi-code": patch
|
||||
---
|
||||
|
||||
Respect the --skills-dir flag in interactive mode.
|
||||
|
|
@ -62,6 +62,7 @@ export async function runShell(
|
|||
const harness = createKimiHarness({
|
||||
homeDir: telemetryBootstrap.homeDir,
|
||||
identity: createKimiCodeHostIdentity(version),
|
||||
skillDirs: opts.skillsDirs,
|
||||
telemetry: telemetryClient,
|
||||
onOAuthRefresh: (outcome) => {
|
||||
if (outcome.success) {
|
||||
|
|
|
|||
|
|
@ -241,6 +241,34 @@ describe('runShell', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('forwards skillsDirs from CLI options to the harness', async () => {
|
||||
mocks.loadTuiConfig.mockResolvedValue({
|
||||
theme: 'dark',
|
||||
editorCommand: null,
|
||||
notifications: { enabled: true, condition: 'unfocused' },
|
||||
});
|
||||
mocks.tuiStart.mockResolvedValue(undefined);
|
||||
|
||||
await runShell(
|
||||
{
|
||||
session: undefined,
|
||||
continue: false,
|
||||
yolo: false,
|
||||
auto: false,
|
||||
plan: false,
|
||||
model: undefined,
|
||||
outputFormat: undefined,
|
||||
prompt: undefined,
|
||||
skillsDirs: ['/skills'],
|
||||
},
|
||||
'1.2.3-test',
|
||||
);
|
||||
|
||||
expect(mocks.kimiHarnessConstructor).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ skillDirs: ['/skills'] }),
|
||||
);
|
||||
});
|
||||
|
||||
it('tracks first launch when device id creation reports first launch', async () => {
|
||||
mocks.loadTuiConfig.mockResolvedValue({
|
||||
theme: 'dark',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue