Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bf3e992
fix(settings): align setting actions to the right
musnows Jun 13, 2026
e7a53ef
fix(editor): improve picker icon resolution
musnows Jun 13, 2026
9041300
Merge pull request #241 from musnows/codex/settings-actions-right-align
XingYu-Zhong Jun 13, 2026
21eac9d
Merge pull request #243 from musnows/codex/fix-editor-icon-resolution
XingYu-Zhong Jun 13, 2026
7b5bb72
fix: keep write export menu anchored right
XingYu-Zhong Jun 13, 2026
dca18ed
fix: compact provider model capability badges
musnows Jun 13, 2026
1b4a24a
Merge pull request #245 from musnows/codex/compact-model-capability-b…
XingYu-Zhong Jun 13, 2026
5cbba36
feat(write): add selection quote action
musnows Jun 13, 2026
8798bb8
fix(attachments): expose picker file path through kun bridge
musnows Jun 13, 2026
36042a2
Merge pull request #249 from musnows/codex/fix-fallback-filepath-develop
XingYu-Zhong Jun 13, 2026
49d3bc7
Merge pull request #248 from musnows/codex/add-write-selection-quote-…
XingYu-Zhong Jun 13, 2026
d9deab5
feat: support custom model endpoints
musnows Jun 13, 2026
17e850f
Merge pull request #246 from musnows/codex/custom-endpoint-model-dedupe
XingYu-Zhong Jun 13, 2026
c8aec4c
fix: harden runtime parsing and error handling
XingYu-Zhong Jun 13, 2026
cfe0e40
feat(skills): add management toggles
musnows Jun 13, 2026
5467160
fix(chat): allow failed tool details to collapse
musnows Jun 13, 2026
c8e05d0
style(sidebar): reduce schedule project spacing
musnows Jun 13, 2026
e04bbe1
fix(models): hide provider alias models from picker
musnows Jun 13, 2026
2f67803
fix(git): detect non-repo dirs regardless of git locale
whitelonng Jun 13, 2026
c97502a
fix(runtime): probe fallback Kun ports
musnows Jun 13, 2026
ee00485
Add Zhipu Z.ai and Kimi provider presets
XingYu-Zhong Jun 13, 2026
07a44e2
fix(sdd): hide empty requirement assistant threads
XingYu-Zhong Jun 13, 2026
9a03bc6
Clarify preset provider API key probing
XingYu-Zhong Jun 13, 2026
6de8ec1
feat:add GLM model providers
XingYu-Zhong Jun 13, 2026
a7847db
Merge pull request #267 from musnows/codex/fix-kun-port-probing-254-c…
XingYu-Zhong Jun 13, 2026
4788286
Merge pull request #265 from whitelonng/fix/git-locale-detection
XingYu-Zhong Jun 13, 2026
22a7623
Merge pull request #260 from musnows/codex/hide-deepseek-alias-models
XingYu-Zhong Jun 13, 2026
4487be3
Merge pull request #257 from musnows/codex/reduce-schedule-sidebar-gap
XingYu-Zhong Jun 13, 2026
4acad17
Merge pull request #253 from musnows/codex/fix-tool-error-collapse-251
XingYu-Zhong Jun 13, 2026
24e6972
Merge pull request #252 from musnows/codex/apply-skills-pr-199-develop
XingYu-Zhong Jun 13, 2026
a3e776a
fix:cache and rebuild compat model client
XingYu-Zhong Jun 13, 2026
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
4 changes: 2 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ Kun is structured as **ports & adapters**:
`ApprovalGate`, `EventBus`, `WorkspaceInspector`, `Clock`,
`IdGenerator`. These are intentionally small.
- `adapters/` — concrete implementations. The default
`DeepseekCompatModelClient` speaks the
`CompatModelClient` speaks the
`POST {baseUrl}/v1/chat/completions` shape; the default
`LocalToolHost` runs tools in-process with approval gating.
- `services/` — orchestration. `ThreadService` and `TurnService`
Expand Down Expand Up @@ -1348,7 +1348,7 @@ If any check fails, the change is not ready.
| Immutable prefix | `kun/src/cache/immutable-prefix.ts` |
| HTTP routes | `kun/src/server/routes/` |
| Tool host | `kun/src/adapters/tool/local-tool-host.ts` |
| Model client | `kun/src/adapters/model/deepseek-compat-model-client.ts` |
| Model client | `kun/src/adapters/model/compat-model-client.ts` |
| Cache doc | `docs/kun-cache-optimization.md` |
| Architecture doc | `docs/kun-architecture.md` |
| Contribution doc | `docs/kun-contributing.md` |
Expand Down
4 changes: 2 additions & 2 deletions DESIGN.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ Kun is structured as **ports & adapters**:
`ApprovalGate`, `EventBus`, `WorkspaceInspector`, `Clock`,
`IdGenerator`. These are intentionally small.
- `adapters/` — concrete implementations. The default
`DeepseekCompatModelClient` speaks the
`CompatModelClient` speaks the
`POST {baseUrl}/v1/chat/completions` shape; the default
`LocalToolHost` runs tools in-process with approval gating.
- `services/` — orchestration. `ThreadService` and `TurnService`
Expand Down Expand Up @@ -1348,7 +1348,7 @@ If any check fails, the change is not ready.
| Immutable prefix | `kun/src/cache/immutable-prefix.ts` |
| HTTP routes | `kun/src/server/routes/` |
| Tool host | `kun/src/adapters/tool/local-tool-host.ts` |
| Model client | `kun/src/adapters/model/deepseek-compat-model-client.ts` |
| Model client | `kun/src/adapters/model/compat-model-client.ts` |
| Cache doc | `docs/kun-cache-optimization.md` |
| Architecture doc | `docs/kun-architecture.md` |
| Contribution doc | `docs/kun-contributing.md` |
Expand Down
6 changes: 3 additions & 3 deletions docs/kun-cache-optimization.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The toolset itself is part of the prompt prefix. Kun will do the following befor

Implementation location:

- `kun/src/adapters/model/deepseek-compat-model-client.ts`
- `kun/src/adapters/model/compat-model-client.ts`
- `kun/src/cache/tool-catalog-fingerprint.ts`
- `kun/src/loop/agent-loop.ts`

Expand All @@ -137,7 +137,7 @@ Kun currently performs a shared model history repair on messages at the model re
Implementation location:

- `kun/src/domain/model-history-repair.ts`
- `kun/src/adapters/model/deepseek-compat-model-client.ts`
- `kun/src/adapters/model/compat-model-client.ts`
- `kun/src/loop/agent-loop.ts`

Kun will also do a shared layer of history hygiene at model request boundaries:
Expand Down Expand Up @@ -204,7 +204,7 @@ Only when the native field is missing will it fall back to the compatible field:

Implementation location:

- `kun/src/adapters/model/deepseek-compat-model-client.ts`
- `kun/src/adapters/model/compat-model-client.ts`

The hit rate formula uses:

Expand Down
6 changes: 3 additions & 3 deletions docs/kun-cache-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Kun 通过 `ImmutablePrefix` 管理系统 prompt、tools、pinned constraints

实现位置:

- `kun/src/adapters/model/deepseek-compat-model-client.ts`
- `kun/src/adapters/model/compat-model-client.ts`
- `kun/src/cache/tool-catalog-fingerprint.ts`
- `kun/src/loop/agent-loop.ts`

Expand Down Expand Up @@ -130,7 +130,7 @@ Kun 当前在模型请求边界对消息做一层共享的 model history repair
实现位置:

- `kun/src/domain/model-history-repair.ts`
- `kun/src/adapters/model/deepseek-compat-model-client.ts`
- `kun/src/adapters/model/compat-model-client.ts`
- `kun/src/loop/agent-loop.ts`

Kun 也会在模型请求边界做一层共享的 history hygiene:
Expand Down Expand Up @@ -198,7 +198,7 @@ Kun 的缓存命中统计优先使用 provider 原生 usage 字段:

实现位置:

- `kun/src/adapters/model/deepseek-compat-model-client.ts`
- `kun/src/adapters/model/compat-model-client.ts`

命中率公式采用:

Expand Down
6 changes: 3 additions & 3 deletions docs/kun-contributing.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Kun's directory itself is a hexagonal physical layout:
▼ ▼
┌──────────────────────────────────────────────────────────────────────────┐
│ adapters/ -- concrete implementations of ports │
│ model/deepseek-compat-model-client.ts │
│ model/compat-model-client.ts │
│ tool/local-tool-host.ts │
│ in-memory-event-bus / in-memory-approval-gate / in-memory-thread-… │
│ file/file-thread-store / file-session-store │
Expand Down Expand Up @@ -137,7 +137,7 @@ export interface ModelClient {

```

Implementation (`kun/src/adapters/model/deepseek-compat-model-client.ts`)
Implementation (`kun/src/adapters/model/compat-model-client.ts`)
Parse HTTP+SSE into a sequence of `ModelStreamChunk`.

Tests (`kun/tests/ports.test.ts`) are injected directly with `makeFakeModel`
Expand Down Expand Up @@ -502,7 +502,7 @@ Does not involve `loop/`, `server/`, `services/`. Changes are isolated to a smal

1. **ports**:`ModelClient` is already an abstract interface, **no need to change**.
2. **adapters**:`kun/src/adapters/model/openai-compat-model-client.ts`
Create a new one (refer to the SSE parsing logic of `deepseek-compat-model-client.ts`).
Create a new one (refer to the SSE parsing logic of `compat-model-client.ts`).
3. **adapters barrel**:`kun/src/adapters/index.ts` exports new classes.
4. **settings**: in `kun/src/contracts/...` or the caller
`ServeOptionsSchema` adds `modelProvider` field (if you need to switch).
Expand Down
6 changes: 3 additions & 3 deletions docs/kun-contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Kun 的目录本身就是六边形的物理布局:
▼ ▼
┌──────────────────────────────────────────────────────────────────────────┐
│ adapters/ ── ports 的具体实现 │
│ model/deepseek-compat-model-client.ts │
│ model/compat-model-client.ts │
│ tool/local-tool-host.ts │
│ in-memory-event-bus / in-memory-approval-gate / in-memory-thread-… │
│ file/file-thread-store / file-session-store │
Expand Down Expand Up @@ -134,7 +134,7 @@ export interface ModelClient {
}
```

实现 (`kun/src/adapters/model/deepseek-compat-model-client.ts`)
实现 (`kun/src/adapters/model/compat-model-client.ts`)
把 HTTP+SSE 解析为 `ModelStreamChunk` 序列。

测试 (`kun/tests/ports.test.ts`) 直接 `makeFakeModel` 注入
Expand Down Expand Up @@ -489,7 +489,7 @@ cache 路由"。

1. **ports**:`ModelClient` 已经是抽象接口,**不需要改**。
2. **adapters**:`kun/src/adapters/model/openai-compat-model-client.ts`
新建(参考 `deepseek-compat-model-client.ts` 的 SSE 解析逻辑)。
新建(参考 `compat-model-client.ts` 的 SSE 解析逻辑)。
3. **adapters barrel**:`kun/src/adapters/index.ts` 导出新类。
4. **settings**:在 `kun/src/contracts/...` 或调用方
`ServeOptionsSchema` 加 `modelProvider` 字段(若需要切换)。
Expand Down
54 changes: 54 additions & 0 deletions docs/model-provider-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,60 @@ MiniMax:
- image base URL: `https://api.minimaxi.com`
- image models: `image-01`

Zhipu Coding Plan:

- id: `zhipu-coding-plan`
- base URL: `https://open.bigmodel.cn/api/coding/paas/v4`
- endpoint format: OpenAI Chat Completions
- initial models: `glm-5.2`, `glm-5.1`, `glm-5-turbo`, `glm-4.7`,
`glm-4.5-air`
- role: coding subscription provider added from Settings > Providers only

Z.ai Coding Plan:

- id: `zai-coding-plan`
- base URL: `https://api.z.ai/api/coding/paas/v4`
- endpoint format: OpenAI Chat Completions
- initial models: `glm-5.1`, `glm-5`, `glm-5-turbo`, `glm-4.7`,
`glm-4.5-air`
- role: international coding subscription provider added from Settings >
Providers only

Kimi Code:

- id: `kimi-code`
- base URL: `https://api.kimi.com/coding/v1`
- endpoint format: OpenAI Chat Completions
- initial model: `kimi-for-coding`
- role: Kimi coding subscription provider added from Settings > Providers only

Moonshot CN:

- id: `moonshot-cn`
- base URL: `https://api.moonshot.cn/v1`
- endpoint format: OpenAI Chat Completions
- initial models: `kimi-k2.7-code`, `kimi-k2.6`, `kimi-k2.5`,
`moonshot-v1-128k`, `moonshot-v1-32k`, `moonshot-v1-8k`
- model profile note: Kimi K2 models are marked as text+image chat models;
video input is not represented in the current provider schema
- role: Moonshot open-platform provider added from Settings > Providers only

Moonshot Global:

- id: `moonshot-global`
- base URL: `https://api.moonshot.ai/v1`
- endpoint format: OpenAI Chat Completions
- initial models: `kimi-k2.7-code`, `kimi-k2.6`, `kimi-k2.5`,
`moonshot-v1-128k`, `moonshot-v1-32k`, `moonshot-v1-8k`
- model profile note: Kimi K2 models are marked as text+image chat models;
video input is not represented in the current provider schema
- role: international Moonshot open-platform provider added from Settings >
Providers only

The defaults are not locked. Users can edit base URLs, protocols, and model IDs
if provider endpoints change, and they can add custom compatible providers at
any time.

First-run setup intentionally remains focused on the default stack. It only
shows DeepSeek plus the Xiaomi and MiniMax presets; LiteLLM, Zhipu, Z.ai, Kimi
Code, and Moonshot presets are opt-in from Settings > Providers.
4 changes: 3 additions & 1 deletion electron-builder.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ module.exports = {
sign: hasExplicitMacSigningIdentity
},
win: {
icon: './src/asset/img/kun.png',
// Windows does not mask app icons for us; use the rounded asset so
// desktop/start-menu/taskbar shortcuts do not show a hard square edge.
icon: './src/asset/img/kun_mac.png',
target: [{ target: 'nsis', arch: ['x64'] }]
},
nsis: {
Expand Down
2 changes: 1 addition & 1 deletion kun/src/adapters/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './model/deepseek-compat-model-client.js'
export * from './model/compat-model-client.js'
export * from './tool/index.js'
export * from './in-memory-event-bus.js'
export * from './in-memory-approval-gate.js'
Expand Down
Loading
Loading