Commit graph

642 commits

Author SHA1 Message Date
Ma
77b8a9a5a8 fix(core): restore generic edit as fallback tool in agent sessions 2026-04-16 22:10:04 +08:00
fanghanjun
964f53a526 fix(studio): remove 50-model cap from test endpoint response
Services like PPIO (71 models) and SiliconFlow (111 models) were
truncated to 50. Return the full list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 22:07:13 +08:00
Ma
34234df50d fix(studio,core): restore fast model listing and known-model fallbacks 2026-04-16 21:53:07 +08:00
fanghanjun
0bb2138f8d fix(studio): probe returns knownModels when /models is unavailable
When discoveredModels is empty and probe succeeds, return the full
knownModels list (7 for MiniMax) instead of just the probed model.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:51:47 +08:00
fanghanjun
cabc1e31d3 fix(studio): probe uses service's own knownModels first, not global default
buildModelCandidates prioritized the global configModel (kimi-k2.5)
over service-specific models, causing MiniMax probe to try kimi-k2.5
on MiniMax's endpoint. Now uses knownModels[0] as preferredModel
for services that have them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:51:47 +08:00
fanghanjun
5d6a48d28a perf(studio): revert GET /models from full probe to simple API call
f942c84 changed GET /models to call probeServiceCapabilities which does
chat completion testing — causing zhipu to take 97s and minimax 47s.
GET /models only needs the model list, not a full API health check.
Reverted to simple /models fetch + pi-ai fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:51:47 +08:00
fanghanjun
0ec53e00ac perf(studio): skip API probe for services with knownModels
MiniMax GET /models took 47s because it tried the Anthropic endpoint
(no /models) and waited for timeout. Services with knownModels now
return the hardcoded list immediately, skipping the network call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:51:47 +08:00
Ma
26965dd589 fix(core,studio): validate service keys before save and on load 2026-04-16 21:51:47 +08:00
fanghanjun
988a4ce1e4 feat(core): add chapterNumber param to sub_agent tool for auditor/reviser
Previously auditor and reviser always operated on the latest chapter.
Now the agent can pass an explicit chapterNumber so "重写第5章" targets
chapter 5 instead of always hitting the latest.

- Added chapterNumber to SubAgentParams schema
- auditor: pipeline.auditDraft(bookId, chapterNumber)
- reviser: pipeline.reviseDraft(bookId, chapterNumber, mode)
- Updated system prompt to document the parameter

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:51:47 +08:00
Ma
0f92a4ef2c docs: refresh WeChat group QR to v7
Some checks are pending
CI / build-and-test (22, windows-latest) (push) Waiting to run
CI / build-and-test (20, ubuntu-latest) (push) Waiting to run
CI / build-and-test (20, windows-latest) (push) Waiting to run
CI / build-and-test (22, ubuntu-latest) (push) Waiting to run
CI / verify-pack (push) Blocked by required conditions
2026-04-16 20:19:04 +08:00
Ma
cfdb200fff chore(release): bump to v1.3.3 and update changelog 2026-04-16 19:36:22 +08:00
Ma
3813cbbf80 fix(core): require explicit title for agent book creation 2026-04-16 17:56:44 +08:00
Ma
974006ebb2 fix(core,cli,studio): unify real epub export implementation 2026-04-16 17:56:44 +08:00
Ma
f150609058 test(core): narrow agent prompt deterministic-tool assertion 2026-04-16 15:56:10 +08:00
Ma
542182eae6 feat(cli): route TUI chat through local agent sessions 2026-04-16 15:54:46 +08:00
Ma
7ab07a6fa3 fix(core): force book-mode agent to use deterministic writing tools 2026-04-16 15:54:46 +08:00
Ma
18c8da1035 feat(core): add deterministic writing tools to agent session 2026-04-16 15:54:46 +08:00
Ma
db1df2b3bf chore(release): bump to v1.3.2 and update changelog 2026-04-16 10:41:16 +08:00
Ma
ffa0872b5e fix(cli,core): align interact and minimax regressions 2026-04-16 10:41:16 +08:00
Ma
dba462c651 fix(core,studio,cli): unify service routing through presets 2026-04-16 02:05:10 +08:00
Ma
a4a8d4e765 feat(studio): extract safe chat and service polish from #192 2026-04-16 02:02:11 +08:00
Ma
866048bfc2 fix(core): let bootstrap studio projects fall back to env config 2026-04-15 23:18:39 +08:00
Ma
be78d4b2fc fix(core): point minimax preset to anthropic endpoint 2026-04-15 22:31:51 +08:00
Ma
30a0a5dc35 test(core): align minimax resolver expectation with domestic endpoint 2026-04-15 22:16:45 +08:00
Ma
787217191c fix(core): finalize minimax preset after merge 2026-04-15 22:13:06 +08:00
Ma
9dbc517fb5 fix(core,cli): restore provider compatibility and windows studio launch 2026-04-15 22:11:36 +08:00
Ma
5f10f209b2 feat(core): use native transport for custom anthropic chat 2026-04-15 22:08:25 +08:00
Ma
f942c84fbf feat(studio): auto-detect working provider transport settings 2026-04-15 22:08:25 +08:00
Ma
7ce9577ea7 feat(cli): auto-init Studio projects on first launch 2026-04-15 22:00:40 +08:00
fanghanjun
811e055894 chore(release): bump to v1.3.1 and update changelog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:48:11 -07:00
SttFang
4721364997
Merge pull request #187 from SttFang/fix/multi-service-baseurl-resolution
fix: multi-service baseUrl resolution and MiniMax support
2026-04-15 19:40:47 +08:00
fanghanjun
6ecaf3ab92 fix(studio): broadcast book:created after agent-driven book creation
When the agent creates a book via sub_agent architect, the sidebar
didn't refresh because book:created was only broadcast from the
POST /books/create endpoint. Now the agent endpoint also broadcasts
this event when architect completes successfully.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:20:08 -07:00
fanghanjun
ca05a3b207 test: add regression tests for multi-service baseUrl fixes
- service-presets: MiniMax baseUrl correctness, knownModels fallback
- service-resolver: preset baseUrl/api overrides pi-ai built-in values
- normalizeBaseUrl: custom service URL normalization (trailing slash, /v1 append)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:14:42 -07:00
fanghanjun
1cf5d3341d test(architect): 添加 current_state/pending_hooks fallback 回归测试
覆盖三种场景:仅缺 current_state、仅缺 pending_hooks、两者都缺。
确保 parseSections 使用默认模板而非抛错。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:14:18 -07:00
fanghanjun
fe0da0bfda feat(core): improve agent system prompt with format rules and index management
- Add output format rules: no emoji, use bullet lists/tables for structured content
- Add chapter index management instructions so the agent can detect and fix
  index.json inconsistencies (missing chapters, rewrites) using its own tools

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:10:41 -07:00
fanghanjun
8d122876ae fix(studio): fix multi-service baseUrl resolution and custom URL normalization
- Test connection: remove slow chat completion, just validate via /models + fallback
- GET models: add pi-ai fallback when /models returns 404
- Agent fallback/probe: use empty baseUrl instead of config.llm.baseUrl to prevent
  default service URL leaking into other services (e.g. moonshot URL used for minimax)
- Custom service URLs auto-normalize: append /v1 if missing (save, test, resolve)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:00:46 -07:00
fanghanjun
5cada30289 fix(core): always use preset baseUrl/api in resolveServiceModel
pi-ai's built-in model objects may have different baseUrl (e.g. international
endpoint) or api format (e.g. anthropic-messages) than our configured presets.
Always construct our own model object using preset values, only inheriting
metadata (reasoning, cost, contextWindow) from pi-ai.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:00:38 -07:00
fanghanjun
a2e24b74f1 fix(core): correct MiniMax baseUrl and add knownModels fallback
- baseUrl from api.minimax.chat to api.minimaxi.com (current OpenAI-compatible endpoint)
- Add knownModels for MiniMax (7 models) since it doesn't support GET /models
- listModelsForService prioritizes knownModels over dynamic /models call

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:00:28 -07:00
fanghanjun
5652cdebd4 fix: add --parallel to pnpm dev so all packages start concurrently
Without --parallel, tsc --watch in core blocks studio from starting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 04:00:22 -07:00
fanghanjun
d93e22398d 修复建书bug
Architect LLM 生成基础设定时偶尔漏掉 current_state/pending_hooks section,
导致 parseSections 抛错、pipeline agent 反复重试建书。
改为缺失时使用默认空白模板,后续写章由 Settler 正常更新。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 03:50:59 -07:00
Ma
b78e745054 Merge branch 'dev' 2026-04-15 17:24:53 +08:00
Ma
99e72949da test(release): relax studio pack timeout for CI 2026-04-15 17:24:44 +08:00
Ma
31bab8dc76 Merge branch 'dev' 2026-04-15 17:17:58 +08:00
Ma
2967653c6d chore(release): bump to v1.3.0 and update changelog 2026-04-15 17:17:49 +08:00
Ma
e54f145a64 Merge branch 'dev' 2026-04-15 17:14:11 +08:00
Ma
1a018accf9 docs: announce Studio 2.0 and update default launch copy 2026-04-15 16:55:31 +08:00
Ma
7eb5363e33 Merge branch 'dev' 2026-04-15 16:50:54 +08:00
Ma
a938318f21 fix(studio): rehydrate saved service keys in detail view 2026-04-15 16:46:10 +08:00
Ma
4d55dc76d1 feat(studio): improve service save flow and home navigation 2026-04-15 16:31:16 +08:00
Ma
d33ce212e8 fix(studio): allow startup without default model in Studio mode 2026-04-15 16:13:10 +08:00