-
Notifications
You must be signed in to change notification settings - Fork 9.7k
feat: Adding kimchi CLI option #5376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bentleyvk
wants to merge
9
commits into
nexu-io:main
Choose a base branch
from
bentleyvk:vilius-kimchi-cli
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+116
−6
Open
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b978353
feat: Adding kimchi CLI option
vilkaz-cast f92cca6
docs and rpc changed
vilkaz-cast f7153e5
docs fix
vilkaz-cast 59d1c6e
model list fix
vilkaz-cast 460c8a3
docs fix
vilkaz-cast 5c47ca8
Merge remote-tracking branch 'origin/main' into vilius-kimchi-cli
vilkaz-cast 528be97
chore: trigger mergeability re-check
vilkaz-cast ac36111
Merge branch 'main' into vilius-kimchi-cli
bentleyvk 88e903b
Merge branch 'main' into vilius-kimchi-cli
bentleyvk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| import path from "node:path"; | ||
| import { | ||
| DEFAULT_MODEL_OPTION, | ||
| execAgentFile, | ||
| parsePiModels, | ||
| } from "./shared.js"; | ||
| import type { RuntimeAgentDef } from "../types.js"; | ||
|
|
||
| export const kimchiAgentDef = { | ||
| id: "kimchi", | ||
| name: "Kimchi", | ||
| bin: "kimchi", | ||
| versionArgs: ["--version"], | ||
| // Kimchi is built on the pi-mono SDK (same engine as pi), so it inherits | ||
| // pi's `--mode rpc` JSON-RPC-over-stdio transport, `--list-models` TSV | ||
| // output, `--thinking` levels, and `--append-system-prompt` for extra | ||
| // directories. Using pi-rpc instead of ACP gives us multimodal image | ||
| // support, reasoning levels, richer event stream, and avoids the ACP | ||
| // `mcpServers` rejection issue. | ||
| versionProbeTimeoutMs: 15_000, | ||
| fetchModels: async (resolvedBin, env) => { | ||
| try { | ||
| // Unlike pi (which prints to stderr), kimchi outputs the TSV table | ||
| // to stdout. Stderr carries config permission warnings only. | ||
| const { stdout } = await execAgentFile(resolvedBin, ["--list-models"], { | ||
| env, | ||
| timeout: 60_000, | ||
| maxBuffer: 8 * 1024 * 1024, | ||
| }); | ||
| const parsed = parsePiModels(stdout); | ||
| if (!parsed || parsed.length === 0) return null; | ||
| return parsed; | ||
| } catch { | ||
| return null; | ||
| } | ||
| }, | ||
| fallbackModels: [ | ||
| DEFAULT_MODEL_OPTION, | ||
| { id: "kimi-k2.7", label: "kimi-k2.7" }, | ||
| { id: "minimax-m3", label: "minimax-m3" }, | ||
| { id: "deepseek-v4-flash", label: "deepseek-v4-flash" }, | ||
| ], | ||
| reasoningOptions: [ | ||
| { id: "default", label: "Default" }, | ||
| { id: "off", label: "Off" }, | ||
| { id: "minimal", label: "Minimal" }, | ||
| { id: "low", label: "Low" }, | ||
| { id: "medium", label: "Medium" }, | ||
| { id: "high", label: "High" }, | ||
| { id: "xhigh", label: "XHigh" }, | ||
| ], | ||
| buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}) => { | ||
| const args = ["--mode", "rpc"]; | ||
| if (options.model && options.model !== "default") { | ||
| args.push("--model", options.model); | ||
| } | ||
| if (options.reasoning && options.reasoning !== "default") { | ||
| args.push("--thinking", options.reasoning); | ||
| } | ||
| const dirs = (extraAllowedDirs || []).filter( | ||
| (d) => typeof d === "string" && path.isAbsolute(d), | ||
| ); | ||
| for (const d of dirs) { | ||
| args.push("--append-system-prompt", d); | ||
| } | ||
| return args; | ||
| }, | ||
| promptViaStdin: true, | ||
| streamFormat: "pi-rpc", | ||
| supportsImagePaths: true, | ||
| installUrl: "https://kimchi.dev", | ||
| docsUrl: "https://docs.kimchi.dev", | ||
| } satisfies RuntimeAgentDef; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -316,6 +316,7 @@ const CANONICAL_AGENT_ORDER = [ | |
| 'pi', | ||
| 'kiro', | ||
| 'kilo', | ||
| 'kimchi', | ||
| 'vibe', | ||
| 'deepseek', | ||
| 'aider', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.