Skip to content

Commit 816dc11

Browse files
committed
chore: 移除 wiki 系列
1 parent 16be527 commit 816dc11

67 files changed

Lines changed: 60 additions & 5075 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/App.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { LocalFileListPanel } from "./components/panels/main/LocalFileListPanel"
3535
import ErrorPanel from "./components/panels/main/ErrorPanel";
3636
import ToolbarPanel from "./components/panels/main/ToolbarPanel";
3737
import { LoggerPanel } from "./components/panels/tools/LoggerPanel";
38-
import { WikiModal } from "./features/wiki/components/WikiModal";
3938
import {
4039
ExplorationFAB,
4140
ExplorationPanel,
@@ -50,9 +49,6 @@ import {
5049
clearImportParam,
5150
} from "./utils/data/shareHelper";
5251
import { parseUrlParams } from "./utils/data/urlHelper";
53-
import { useWikiStore } from "./stores/wikiStore";
54-
import { clearWikiHashParam, readWikiTargetFromHash } from "./wiki/wikiUrl";
55-
import { isWikiModuleVisible } from "./wiki/visibility";
5652
import {
5753
isWailsEnvironment,
5854
onWailsEvent,
@@ -437,13 +433,6 @@ function App() {
437433

438434
// 统一解析 URL 参数
439435
const urlParams = parseUrlParams();
440-
if (isWikiModuleVisible) {
441-
const wikiTarget = readWikiTargetFromHash();
442-
if (wikiTarget) {
443-
useWikiStore.getState().openWiki(wikiTarget);
444-
clearWikiHashParam();
445-
}
446-
}
447436

448437
// Wails 环境下的连接逻辑
449438
let cleanupWailsListener: (() => void) | null = null;
@@ -598,7 +587,6 @@ function App() {
598587
<Suspense fallback={null}>
599588
<DebugModal />
600589
</Suspense>
601-
{isWikiModuleVisible && <WikiModal />}
602590
<NewcomerGuideModal />
603591
<GlobalListener />
604592
</ThemeProvider>

src/components/Header.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,6 @@ function Header() {
454454
</Tooltip>
455455
</div>
456456
<div className={style.links}>
457-
<Tooltip placement="bottom" title="文档站">
458-
<IconFont
459-
className="icon-interactive"
460-
name="icon-icon_wendangziliaopeizhi"
461-
size={25}
462-
onClick={() => {
463-
window.open("https://mpe.codax.site/docs");
464-
}}
465-
/>
466-
</Tooltip>
467457
<Tooltip placement="bottom" title="Pipeline协议">
468458
<img
469459
className="icon-interactive"

src/components/debug/DebugModal.tsx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { NodeExecutionPanel } from "../../features/debug/components/panels/NodeE
2626
import { PerformancePanel } from "../../features/debug/components/panels/PerformancePanel";
2727
import { ImagesPanel } from "../../features/debug/components/panels/ImagesPanel";
2828
import { DiagnosticsPanel } from "../../features/debug/components/panels/DiagnosticsPanel";
29-
import { WikiPonderTrigger } from "../../features/wiki/components/WikiPonderTrigger";
3029

3130
const { Text, Title } = Typography;
3231

@@ -167,11 +166,6 @@ const modalBodyStyle: CSSProperties = {
167166
overflow: "hidden",
168167
};
169168

170-
const debugWikiTarget = {
171-
entryId: "debug",
172-
moduleId: "workbench",
173-
};
174-
175169
export function DebugModal() {
176170
const controller = useDebugModalController();
177171
const baseActivePanelMeta =
@@ -187,15 +181,7 @@ export function DebugModal() {
187181
return (
188182
<Modal
189183
title={
190-
<Space size={8}>
191-
<span>MPE FlowScope (调试模块)</span>
192-
<WikiPonderTrigger
193-
target={debugWikiTarget}
194-
title="调试工作台"
195-
description="先理解调试工作台、中控台、节点线与事件线的阅读顺序。"
196-
placement="bottom"
197-
/>
198-
</Space>
184+
<span>MPE FlowScope (调试模块)</span>
199185
}
200186
open={controller.modalOpen}
201187
onCancel={controller.closeModal}

src/components/panels/exploration/ExplorationPanel.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { useFlowStore } from "../../../stores/flow";
1616
import { useMFWStore } from "../../../stores/mfwStore";
1717
import { useConfigStore } from "../../../stores/configStore";
1818
import { NodeTypeEnum } from "../../flow/nodes/constants";
19-
import { WikiContextHint } from "../../../features/wiki/components/WikiContextHint";
2019
import style from "../../../styles/panels/ExplorationPanel.module.less";
2120

2221
const { TextArea } = Input;
@@ -275,27 +274,6 @@ function ExplorationPanelBase({ visible, onClose }: ExplorationPanelProps) {
275274
/>
276275
</div>
277276
<div className={style.content}>
278-
{(connectionStatus !== "connected" || !aiApiUrl || !aiApiKey || !aiModel) && (
279-
<WikiContextHint
280-
title="流程探索还没满足前置条件"
281-
summary="流程探索不是单纯的文字问答。它需要设备连接、截图来源和 AI API 配置共同就绪,缺一项都无法稳定推进。"
282-
actions={[
283-
{
284-
label: "AI 前置条件",
285-
target: { entryId: "ai", moduleId: "prerequisites" },
286-
},
287-
{
288-
label: "连接状态与前置条件",
289-
target: {
290-
entryId: "localbridge",
291-
moduleId: "connection-prerequisites",
292-
},
293-
},
294-
]}
295-
type="warning"
296-
className={style.inlineHint}
297-
/>
298-
)}
299277
{renderContent()}
300278
</div>
301279
</div>

src/components/panels/main/ConnectionPanel.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040
PLATFORM_TABS,
4141
MACOS_DEFAULT_METHODS,
4242
} from "./connection";
43-
import { WikiContextHint } from "../../../features/wiki/components/WikiContextHint";
4443

4544
const { Text } = Typography;
4645

@@ -715,27 +714,6 @@ export const ConnectionPanel = memo(
715714
showIcon
716715
style={{ marginBottom: 0 }}
717716
/>
718-
<WikiContextHint
719-
title="先按连接问题排查顺序处理"
720-
summary="连接失败时,先确认目标设备、截图/输入方法和手动连接参数是不是同一类问题,再决定刷新、重连还是切换设备。"
721-
actions={[
722-
{
723-
label: "连接状态与前置条件",
724-
target: {
725-
entryId: "localbridge",
726-
moduleId: "connection-prerequisites",
727-
},
728-
},
729-
{
730-
label: "常见连接问题",
731-
target: {
732-
entryId: "localbridge",
733-
moduleId: "common-connection-issues",
734-
},
735-
},
736-
]}
737-
type="warning"
738-
/>
739717
</div>
740718
)}
741719

src/components/panels/tools/GlobalPanel.tsx

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { memo, lazy, Suspense, useMemo, useState } from "react";
1+
import { memo, lazy, Suspense, useMemo, useState, useEffect, useRef } from "react";
22
import { message, Tooltip, Popover } from "antd";
33
import classNames from "classnames";
44
import IconFont from "../../iconfonts";
@@ -7,8 +7,6 @@ import { useFlowStore } from "../../../stores/flow";
77
import { useConfigStore } from "../../../stores/configStore";
88
import { useClipboardStore } from "../../../stores/clipboardStore";
99
import { useDebugSessionStore } from "../../../stores/debugSessionStore";
10-
import { useWikiStore } from "../../../stores/wikiStore";
11-
import { isWikiModuleVisible } from "../../../wiki/visibility";
1210
import PathSelector from "./PathSelector";
1311
import style from "../../../styles/panels/ToolPanel.module.less";
1412

@@ -25,7 +23,59 @@ type GlobalToolType = {
2523
onDisabledClick?: () => void;
2624
};
2725

26+
const DOCS_URL = "https://mpe.codax.site/docs";
27+
const HOLD_DURATION_MS = 600;
28+
29+
function isEditableTarget(target: EventTarget | null) {
30+
if (!(target instanceof HTMLElement)) return false;
31+
const tagName = target.tagName.toLowerCase();
32+
if (tagName === "input" || tagName === "textarea" || tagName === "select") return true;
33+
if (target.isContentEditable) return true;
34+
if (target.closest('[contenteditable="true"]')) return true;
35+
return Boolean(target.closest(".monaco-editor"));
36+
}
37+
38+
function useDocsHoldHotkey() {
39+
const timerRef = useRef<number | undefined>(undefined);
40+
const holdingRef = useRef(false);
41+
42+
useEffect(() => {
43+
const handleKeyDown = (event: KeyboardEvent) => {
44+
if (event.key.toLowerCase() !== "w") return;
45+
if (event.repeat || holdingRef.current) return;
46+
if (event.ctrlKey || event.altKey || event.metaKey) return;
47+
if (event.isComposing || isEditableTarget(event.target)) return;
48+
49+
holdingRef.current = true;
50+
timerRef.current = window.setTimeout(() => {
51+
holdingRef.current = false;
52+
window.open(DOCS_URL, "_blank");
53+
}, HOLD_DURATION_MS);
54+
};
55+
56+
const handleKeyUp = (event: KeyboardEvent) => {
57+
if (event.key.toLowerCase() === "w") {
58+
if (timerRef.current !== undefined) {
59+
window.clearTimeout(timerRef.current);
60+
timerRef.current = undefined;
61+
}
62+
holdingRef.current = false;
63+
}
64+
};
65+
66+
document.addEventListener("keydown", handleKeyDown);
67+
document.addEventListener("keyup", handleKeyUp);
68+
return () => {
69+
document.removeEventListener("keydown", handleKeyDown);
70+
document.removeEventListener("keyup", handleKeyUp);
71+
if (timerRef.current !== undefined) window.clearTimeout(timerRef.current);
72+
};
73+
}, []);
74+
}
75+
2876
function GlobalPanel() {
77+
useDocsHoldHotkey();
78+
2979
// store
3080
const clipboardNodes = useClipboardStore((state) => state.clipboardNodes);
3181
const debouncedSelectedNodes = useFlowStore(
@@ -42,7 +92,6 @@ function GlobalPanel() {
4292
const getHistoryState = useFlowStore((state) => state.getHistoryState);
4393
const pathMode = useFlowStore((state) => state.pathMode);
4494
const openDebugModal = useDebugSessionStore((state) => state.openModal);
45-
const openWiki = useWikiStore((state) => state.openWiki);
4695

4796
// 历史状态
4897
const [, forceUpdate] = useState({});
@@ -267,23 +316,21 @@ function GlobalPanel() {
267316
</Tooltip>
268317
</li>
269318
</div>
270-
{isWikiModuleVisible && (
271-
<div className={style.group}>
319+
<div className={style.group}>
272320
<div className={style.devider}>
273321
<div></div>
274322
</div>
275323
<li className={style.item}>
276-
<Tooltip placement="bottom" title="MPE Wiki / 俺寻思">
324+
<Tooltip placement="bottom" title="文档站">
277325
<IconFont
278326
className={style.icon}
279327
name="icon-icon_wendangziliaopeizhi"
280328
size={24}
281-
onClick={() => openWiki()}
329+
onClick={() => window.open("https://mpe.codax.site/docs", "_blank")}
282330
/>
283331
</Tooltip>
284332
</li>
285333
</div>
286-
)}
287334
</ul>
288335
<ul className={editPanelClass}>{renderTools(editingTools)}</ul>
289336
</>

src/components/panels/tools/ToolboxPanel.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { CopyOutlined } from "@ant-design/icons";
44
import IconFont from "../../iconfonts";
55
import { type IconNames } from "../../iconfonts";
66
import { useMFWStore } from "../../../stores/mfwStore";
7-
import { WikiContextHint } from "../../../features/wiki/components/WikiContextHint";
87
import style from "../../../styles/panels/ToolboxPanel.module.less";
98

109
const ROIModal = lazy(() =>
@@ -458,27 +457,6 @@ function ToolboxPanel() {
458457
))}
459458
</div>
460459

461-
{connectionStatus !== "connected" && (
462-
<WikiContextHint
463-
title="截图类工具依赖本地能力"
464-
summary="工具箱里的 OCR、模板截图、ROI 和颜色取点都需要先连上本地服务与设备。看到“请先连接本地服务与设备”时,先回到连接状态与截图前置条件。"
465-
actions={[
466-
{
467-
label: "连接状态与前置条件",
468-
target: {
469-
entryId: "localbridge",
470-
moduleId: "connection-prerequisites",
471-
},
472-
},
473-
{
474-
label: "设备与截图前置",
475-
target: { entryId: "localbridge", moduleId: "device-screenshot" },
476-
},
477-
]}
478-
type="warning"
479-
className={style.resultArea}
480-
/>
481-
)}
482460

483461
{/* 结果预览区 */}
484462
{renderResultPreview()}

src/data/updateLogs.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,12 @@ export const longTermPreview: ForecastSection = {
8787
};
8888

8989
export const nextPreview: ForecastSection = {
90-
title: "Next Version 至 v1.7.0",
91-
notice: "预告内容会随开发进度与实际需求调整,不代表最终承诺。",
92-
items: [
93-
{
94-
theme: "Wiki",
95-
title: "俺寻思",
96-
description:
97-
"集成式 Wiki 模块,可在 MPE 内直接查看动态教程,支持任意界面直接跳转至对应模块内容。",
98-
},
99-
],
90+
title: "Next Version",
91+
notice: "",
92+
items: [],
10093
};
10194

10295
export const updateLogs: UpdateLogItem[] = [
103-
// {
104-
// version: "1.7.0",
105-
// date: "2026-6-",
106-
// type: "major",
107-
// updates: {
108-
// features: [
109-
// "📚 新增内嵌 wiki “俺寻思” 模块,可在主要功能处 hover 图标长按 w 跳转",
110-
// ],
111-
// },
112-
// },
11396
{
11497
version: "1.6.1",
11598
date: "2026-6-",

src/features/wiki/components/WikiBlock.module.less

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)