Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/kimi-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"chalk": "^5.4.1",
"cli-highlight": "^2.1.11",
"commander": "^13.1.0",
"pathe": "^2.0.3",
"semver": "^7.7.4",
"smol-toml": "^1.6.1",
"zod": "^4.3.6"
Expand Down
3 changes: 2 additions & 1 deletion apps/kimi-code/src/cli/run-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
type SessionStatus,
type TelemetryClient,
} from '@moonshot-ai/kimi-code-sdk';
import { resolve } from 'pathe';

import { CLI_SHUTDOWN_TIMEOUT_MS } from '#/constant/app';
import { experimentalFeatureMap } from '#/utils/experimental-features';
Expand Down Expand Up @@ -229,7 +230,7 @@ async function resolvePromptSession(
if (target === undefined) {
throw new Error(`Session "${opts.session}" not found.`);
}
if (target.workDir !== workDir) {
if (resolve(target.workDir) !== resolve(workDir)) {
stderr.write(
`${chalk.hex('#E8A838')(
`Session "${opts.session}" was created under a different directory.\n` +
Expand Down
3 changes: 2 additions & 1 deletion apps/kimi-code/src/tui/kimi-tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import type {
Session,
} from '@moonshot-ai/kimi-code-sdk';
import chalk from 'chalk';
import { resolve } from 'pathe';

import type { CLIOptions } from '#/cli/options';
import { MigrationScreenComponent, type MigrationScreenResult } from '#/migration/index';
Expand Down Expand Up @@ -511,7 +512,7 @@ export class KimiTUI {
if (target === undefined) {
throw new Error(`Session "${startup.sessionFlag}" not found.`);
}
if (target.workDir !== workDir) {
if (resolve(target.workDir) !== resolve(workDir)) {
this.state.ui.stop();
process.stderr.write(
`${chalk.hex(this.state.theme.colors.warning)(
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading