feat(desktop): add zhihu publish adapter

Ship a Zhihu publish adapter that reuses the shared session fetch and
image pipeline: converts markdown to HTML via marked, uploads cover
and inline images through Zhihu's image token flow, creates a draft,
and publishes it, returning external article URLs. Wire it into the
adapter barrel and runtime-controller's publish adapter selector so
Zhihu publish tasks stop falling through to the scaffold result.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-20 11:45:08 +08:00
parent dc68ad044c
commit 4d0c4510ef
3 changed files with 398 additions and 0 deletions
@@ -13,6 +13,7 @@ import type {
import {
doubaoAdapter,
toutiaoAdapter,
zhihuAdapter,
type AdapterExecutionResult,
type MonitorAdapter,
type PublishAdapter,
@@ -1150,6 +1151,9 @@ function selectPublishAdapter(platform: string): PublishAdapter | null {
if (platform === toutiaoAdapter.platform) {
return toutiaoAdapter;
}
if (platform === zhihuAdapter.platform) {
return zhihuAdapter;
}
return null;
}