Skip to content

Commit 5dcb0f0

Browse files
committed
fix: 修复 mermaid rect 黑色背景、代码块缺少 language 属性
1 parent 9bcf38b commit 5dcb0f0

3 files changed

Lines changed: 8 additions & 17 deletions

File tree

src/pages/IDEDiffProtocol.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ this.client.setNotificationHandler(
550550
</div>
551551
</div>
552552

553-
<CodeBlock code={architectureCode} title="IDE 集成双向通信架构" />
553+
<CodeBlock language="typescript" code={architectureCode} title="IDE 集成双向通信架构" />
554554
</Layer>
555555

556556
{/* 5. 流程图 */}
@@ -559,16 +559,16 @@ this.client.setNotificationHandler(
559559
<div>
560560
<h4 className="text-lg font-semibold text-heading mb-3">连接建立流程</h4>
561561
<MermaidDiagram chart={connectionFlowChart} title="IDE 连接建立流程" />
562-
<CodeBlock code={portFileCode} title="端口发现机制实现" />
562+
<CodeBlock language="typescript" code={portFileCode} title="端口发现机制实现" />
563563
</div>
564564

565565
<div>
566566
<h4 className="text-lg font-semibold text-heading mb-3">Diff View 交互流程</h4>
567567
<MermaidDiagram chart={diffFlowChart} title="完整 Diff 交互流程" />
568568

569569
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
570-
<CodeBlock code={clientDiffCode} title="CLI 侧 openDiff() 调用" />
571-
<CodeBlock code={showDiffCode} title="VS Code 侧 showDiff() 实现" />
570+
<CodeBlock language="typescript" code={clientDiffCode} title="CLI 侧 openDiff() 调用" />
571+
<CodeBlock language="typescript" code={showDiffCode} title="VS Code 侧 showDiff() 实现" />
572572
</div>
573573
</div>
574574
</div>
@@ -836,7 +836,7 @@ this.client.setNotificationHandler(
836836
{/* 技术细节补充 */}
837837
<Layer title="技术细节补充">
838838
<div className="space-y-4">
839-
<CodeBlock code={diffSchemeCode} title="gemini-diff:// URI Scheme 实现" />
839+
<CodeBlock language="typescript" code={diffSchemeCode} title="gemini-diff:// URI Scheme 实现" />
840840

841841
<div className="bg-base/30 rounded-lg p-4">
842842
<h4 className="text-heading font-bold mb-2">URI 结构示例</h4>
@@ -852,7 +852,7 @@ this.client.setNotificationHandler(
852852
</div>
853853
</div>
854854

855-
<CodeBlock code={mcpServerCode} title="MCP Server 工具注册" />
855+
<CodeBlock language="typescript" code={mcpServerCode} title="MCP Server 工具注册" />
856856

857857
<div className="bg-surface rounded-lg p-4">
858858
<h4 className="text-heading font-bold mb-3">MCP 通知类型</h4>
@@ -884,7 +884,7 @@ this.client.setNotificationHandler(
884884
</table>
885885
</div>
886886

887-
<CodeBlock code={contextSyncCode} title="IDE 上下文双向同步" />
887+
<CodeBlock language="typescript" code={contextSyncCode} title="IDE 上下文双向同步" />
888888

889889
<HighlightBox title="工作区信任状态同步" variant="green">
890890
<p className="text-sm">

src/pages/PlanMode.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { HighlightBox } from '../components/HighlightBox';
33
import { MermaidDiagram } from '../components/MermaidDiagram';
44
import { CodeBlock } from '../components/CodeBlock';
55
import { Layer } from '../components/Layer';
6+
import { getThemeColor } from '../utils/theme';
67
import { RelatedPages, type RelatedPage } from '../components/RelatedPages';
78

89
const relatedPages: RelatedPage[] = [
@@ -315,12 +316,10 @@ sequenceDiagram
315316
U->>PM: /plan create "重构认证模块"
316317
PM->>RA: 启动代码分析
317318
318-
rect rgb(26, 30, 38)
319319
Note over RA: 只读分析阶段
320320
RA->>RA: 遍历文件结构
321321
RA->>RA: 分析依赖关系
322322
RA->>RA: 识别影响范围
323-
end
324323
325324
RA->>PG: 分析报告
326325
PG->>PM: 生成初始计划
@@ -334,11 +333,9 @@ sequenceDiagram
334333
U->>PM: /plan approve
335334
PM->>PE: 执行已批准计划
336335
337-
rect rgb(26, 30, 38)
338336
Note over PE: 执行阶段
339337
PE->>PE: 逐步执行修改
340338
PE->>U: 报告每步进度
341-
end
342339
343340
PE->>PM: 执行完成
344341
PM->>U: 计划完成报告

src/pages/ZedIntegration.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,18 @@ sequenceDiagram
8484
participant A as Gemini Agent
8585
participant M as Model API
8686
87-
rect rgb(60, 60, 80)
8887
Note over Z,A: 初始化阶段
8988
Z->>A: initialize(protocolVersion, capabilities)
9089
A->>Z: InitializeResponse(authMethods, agentCapabilities)
9190
Z->>A: authenticate(methodId: "oauth-personal")
9291
A->>Z: AuthenticateResponse(success)
93-
end
9492
95-
rect rgb(60, 80, 60)
9693
Note over Z,A: 会话创建
9794
Z->>A: session/new(cwd, mcpServers[])
9895
A->>A: 创建 Config
9996
A->>A: 启动 GeminiChat
10097
A->>Z: NewSessionResponse(sessionId)
101-
end
10298
103-
rect rgb(80, 60, 60)
10499
Note over Z,M: 对话循环
105100
Z->>A: session/prompt(sessionId, contentBlocks[])
106101
A->>A: 解析 @命令
@@ -116,7 +111,6 @@ sequenceDiagram
116111
end
117112
118113
A->>Z: PromptResponse(stopReason)
119-
end
120114
`} />
121115
</div>
122116
)}

0 commit comments

Comments
 (0)