chatgpt-pro-research 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Octo-o-o-o
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,51 @@
1
- # Temporary Holding Version
1
+ # chatgpt-pro-research
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 用 ChatGPT Pro 网页会话做无人值守多轮调研的 DeepSeek Harness 插件。
4
+
5
+ > 这是订阅网页自动化,不是官方 API。自动化网页可能违反服务条款、触发风控或导致账号受限;页面改版也会让它失效。请自行评估风险,不要把凭据写进仓库或日志。
6
+
7
+ ## 安装
8
+
9
+ ```bash
10
+ dsh plugin --profile desktop add chatgpt-pro-research
11
+ ```
12
+
13
+ 安装后在 DSH 设置页填写轮次上限、记录位置(project / local)、原始答复目录与浏览器 profile。首次使用先登录一次:
14
+
15
+ ```text
16
+ 让 agent 调用 pro_research(action="login")
17
+ ```
18
+
19
+ 弹出一个独立 Chrome 窗口,登录 ChatGPT 后关闭即可;登录态保存在 `~/.dsh/pro-research/browser`(与 GPT-Image Design 共用)。
20
+
21
+ ## 使用
22
+
23
+ 在会话里说「用 Pro 调研一下……」,或直接调用 `pro_research` 工具:
24
+
25
+ ```text
26
+ action=start, confirmed=true, title, question, brief, criteria[], materials[], rounds
27
+ ```
28
+
29
+ 其余动作:`status`、`list`、`resume`、`cancel`、`human_check`、`probe`、`login`。
30
+
31
+ 侧边栏「Pro Research」面板列出主题、轮次、状态与记录路径;卡住时可恢复、取消或人工核对。
32
+
33
+ ## 桌面加载
34
+
35
+ 前端使用 DSH `0.2.1-rc.2` 的 `window.__ModuleLoader__.load()` 惰性模块格式,共用宿主 React,并通过 `slots.inject()` 等待主面板与侧边栏槽位就绪。源码安装前先在仓库根目录运行 `npm run build` 和 `node scripts/smoke-bundle.mjs`;重建后确认 profile 中的安装产物已同步。本机 `file:` 安装的产物是硬链接,可随重建一起更新,复制或打包安装则需重新安装。
36
+
37
+ ## 记录
38
+
39
+ - `store=project`:`<项目>/docs/research/<slug>/`,含问题、裁决、回执、最终汇总。
40
+ - `store=local`:`~/.dsh/chatgpt-pro-research/projects/<project>/<slug>/`。
41
+ - 原始答复默认只在本机 `rawAnswersDir/<topic-id>/`;`rawAnswers=repo` 才复制进项目。
42
+
43
+ ## 边界
44
+
45
+ - 不自动 push;GitHub 只是 ChatGPT 自己的可选材料来源。
46
+ - 提交状态未知时不自动重发,需人工核对。
47
+ - 页面改版、账号风险、ToS 风险由使用者承担。
48
+
49
+ ## 许可证
50
+
51
+ MIT。
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: chatgpt-pro-research
3
+ name: chatgpt-pro-research
package/lib/client.js ADDED
@@ -0,0 +1,330 @@
1
+ window.__ModuleLoader__.load({ id: "chatgpt-pro-research", factory: (require) => {
2
+ var module = { exports: {} }; var exports = module.exports;
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // client/index.tsx
23
+ var index_exports = {};
24
+ __export(index_exports, {
25
+ apply: () => apply,
26
+ inject: () => inject
27
+ });
28
+ module.exports = __toCommonJS(index_exports);
29
+
30
+ // client/panel.tsx
31
+ var import_react = require("react");
32
+
33
+ // client/icons.ts
34
+ var RESEARCH_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-40 -76 200 200"><title>Anyvia R</title><defs><mask id="R-mono-black-standard-gap" maskUnits="userSpaceOnUse" x="-100" y="-100" width="400" height="400"><rect x="-100" y="-100" width="400" height="400" fill="white"/><path d="M77.18032292691355 52.74975779269961 A3 3 0 0 1 79.72446721538282 48.16 L108.02474889607315 48.16 A3 3 0 0 1 110.56889318454242 49.57024220730038 L139.21290427606598 95.41024220730039 A3 3 0 0 1 136.6687599875967 100 L108.36847830690638 100 A3 3 0 0 1 105.82433401843711 98.58975779269961 Z" transform="translate(-30 -12)" fill="black" stroke="black" stroke-width="6" stroke-linejoin="round"/></mask></defs><g mask="url(#R-mono-black-standard-gap)"><path d="M3.46 -40 H67 A39 39 0 0 1 67 38 H36.81354211962983 V84.54 Q36.81354211962983 88 33.35354211962983 88 H3.46 Q0 88 0 84.54 V-36.54 Q0 -40 3.46 -40 Z M36.81354211962983 -14 V12 H67 A13 13 0 0 0 67 -14 Z" fill="currentColor" fill-rule="evenodd"/></g><path d="M77.18032292691355 52.74975779269961 A3 3 0 0 1 79.72446721538282 48.16 L108.02474889607315 48.16 A3 3 0 0 1 110.56889318454242 49.57024220730038 L139.21290427606598 95.41024220730039 A3 3 0 0 1 136.6687599875967 100 L108.36847830690638 100 A3 3 0 0 1 105.82433401843711 98.58975779269961 Z" transform="translate(-30 -12)" fill="currentColor"/></svg>';
35
+ var DESIGN_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-22.599456503942804 -56 200 200"><title>Anyvia X</title><defs><mask id="X-mono-black-standard-gap" maskUnits="userSpaceOnUse" x="-100" y="-100" width="400" height="400"><rect x="-100" y="-100" width="400" height="400" fill="white"/><path d="M77.18032292691355 52.74975779269961 A3 3 0 0 1 79.72446721538282 48.16 L108.02474889607315 48.16 A3 3 0 0 1 110.56889318454242 49.57024220730038 L139.21290427606598 95.41024220730039 A3 3 0 0 1 136.6687599875967 100 L108.36847830690638 100 A3 3 0 0 1 105.82433401843711 98.58975779269961 Z" transform="translate(-12 0)" fill="black" stroke="black" stroke-width="6" stroke-linejoin="round"/></mask></defs><g mask="url(#X-mono-black-standard-gap)"><path d="M89.67202319894069 -10.373520654246889 A3.46 3.46 0 0 1 92.60626961164192 -12 L127.85608887910462 -12 A3.46 3.46 0 0 1 130.79033529180586 -6.706479345753113 L65.12906379317373 98.37352065424689 A3.46 3.46 0 0 1 62.19481738047249 100 L26.94499811300981 100 A3.46 3.46 0 0 1 24.010751700308575 94.70647934575311 Z" fill="currentColor"/><path d="M28.027942559241307 -6.706479345753113 A3.46 3.46 0 0 1 30.96218897194254 -12 L58.17762652153973 -12 A3.46 3.46 0 0 1 61.111872934240964 -10.373520654246889 L91.78046072595076 38.70647934575311 A3.46 3.46 0 0 1 88.84621431324952 44 L61.63077676365233 44 A3.46 3.46 0 0 1 58.69653035095109 42.37352065424689 Z" fill="currentColor"/></g><path d="M77.18032292691355 52.74975779269961 A3 3 0 0 1 79.72446721538282 48.16 L108.02474889607315 48.16 A3 3 0 0 1 110.56889318454242 49.57024220730038 L139.21290427606598 95.41024220730039 A3 3 0 0 1 136.6687599875967 100 L108.36847830690638 100 A3 3 0 0 1 105.82433401843711 98.58975779269961 Z" transform="translate(-12 0)" fill="currentColor"/></svg>';
36
+
37
+ // client/panel.tsx
38
+ var POLL_MS = 3e3;
39
+ var config = {
40
+ routes: "/chatgpt-pro-research",
41
+ panelId: "chatgpt-pro-research",
42
+ title: "ChatGPT Pro Research",
43
+ label: "Pro Research",
44
+ icon: "research",
45
+ designMode: false
46
+ };
47
+ function configure(spec) {
48
+ config = spec;
49
+ }
50
+ var inject = ["slots"];
51
+ var STATUS_LABEL = {
52
+ draft: "\u8349\u7A3F",
53
+ queued: "\u6392\u961F",
54
+ uploading: "\u4E0A\u4F20\u4E2D",
55
+ submitted: "\u5DF2\u63D0\u4EA4",
56
+ waiting: "\u7B49\u5F85\u7B54\u590D",
57
+ answered: "\u5DF2\u7B54\u590D",
58
+ adjudicating: "\u88C1\u51B3\u4E2D",
59
+ completed: "\u5B8C\u6210",
60
+ capped: "\u5230\u8F6E\u6B21\u4E0A\u9650",
61
+ stalled: "\u5361\u4F4F",
62
+ failed: "\u5931\u8D25",
63
+ cancelled: "\u5DF2\u53D6\u6D88"
64
+ };
65
+ var STATUS_COLOR = {
66
+ completed: "#2e7d32",
67
+ capped: "#6a1b9a",
68
+ stalled: "#ed6c02",
69
+ failed: "#c62828",
70
+ cancelled: "#757575"
71
+ };
72
+ var ACTIVE = /* @__PURE__ */ new Set(["queued", "uploading", "submitted", "waiting", "answered", "adjudicating"]);
73
+ async function getJson(url) {
74
+ const response = await fetch(url, { headers: { accept: "application/json" } });
75
+ if (!response.ok) throw new Error(`${response.status} ${response.statusText}`);
76
+ return await response.json();
77
+ }
78
+ async function postAction(body) {
79
+ const response = await fetch(`${config.routes}/action`, {
80
+ method: "POST",
81
+ headers: { "content-type": "application/json" },
82
+ body: JSON.stringify(body)
83
+ });
84
+ if (!response.ok) {
85
+ const text = await response.text().catch(() => "");
86
+ throw new Error(text === "" ? `${response.status}` : text);
87
+ }
88
+ }
89
+ function Dot({ status }) {
90
+ return (0, import_react.createElement)("span", {
91
+ style: {
92
+ display: "inline-block",
93
+ width: 8,
94
+ height: 8,
95
+ borderRadius: 999,
96
+ background: STATUS_COLOR[status] ?? "var(--dsh-text-2, #757575)",
97
+ marginRight: 6,
98
+ flex: "0 0 auto"
99
+ }
100
+ });
101
+ }
102
+ function Panel() {
103
+ const [topics, setTopics] = (0, import_react.useState)([]);
104
+ const [selected, setSelected] = (0, import_react.useState)(void 0);
105
+ const [detail, setDetail] = (0, import_react.useState)(void 0);
106
+ const [error, setError] = (0, import_react.useState)(void 0);
107
+ const loadList = (0, import_react.useCallback)(async () => {
108
+ try {
109
+ const data = await getJson(`${config.routes}/topics`);
110
+ setTopics(data.topics);
111
+ setError(void 0);
112
+ if (selected === void 0 && data.topics[0] !== void 0) setSelected(data.topics[0].topic_id);
113
+ } catch (cause) {
114
+ setError(cause instanceof Error ? cause.message : String(cause));
115
+ }
116
+ }, [selected]);
117
+ const loadDetail = (0, import_react.useCallback)(async (id) => {
118
+ try {
119
+ const data = await getJson(`${config.routes}/topic?id=${encodeURIComponent(id)}`);
120
+ setDetail(data.topic);
121
+ } catch (cause) {
122
+ setError(cause instanceof Error ? cause.message : String(cause));
123
+ }
124
+ }, []);
125
+ (0, import_react.useEffect)(() => {
126
+ void loadList();
127
+ const timer = setInterval(() => {
128
+ void loadList();
129
+ }, POLL_MS);
130
+ return () => clearInterval(timer);
131
+ }, [loadList]);
132
+ (0, import_react.useEffect)(() => {
133
+ if (selected === void 0) return;
134
+ void loadDetail(selected);
135
+ const timer = setInterval(() => {
136
+ void loadDetail(selected);
137
+ }, POLL_MS);
138
+ return () => clearInterval(timer);
139
+ }, [selected, loadDetail, topics]);
140
+ const act = (0, import_react.useCallback)(async (action, conclusion) => {
141
+ if (selected === void 0) return;
142
+ let note;
143
+ if (action === "human_check") {
144
+ const input = window.prompt("\u6838\u5BF9\u7ED3\u8BBA\u7684\u4F9D\u636E\uFF08\u5FC5\u586B\uFF09");
145
+ if (input === null || input.trim() === "") return;
146
+ note = input.trim();
147
+ }
148
+ try {
149
+ await postAction({ action, topic_id: selected, ...conclusion !== void 0 ? { conclusion } : {}, ...note !== void 0 ? { note } : {} });
150
+ await loadDetail(selected);
151
+ await loadList();
152
+ } catch (cause) {
153
+ setError(cause instanceof Error ? cause.message : String(cause));
154
+ }
155
+ }, [selected, loadDetail, loadList]);
156
+ const list = (0, import_react.createElement)(
157
+ "div",
158
+ { style: { width: 240, borderRight: "1px solid rgba(127,127,127,.2)", overflowY: "auto", flex: "0 0 auto" } },
159
+ (0, import_react.createElement)("div", { style: { padding: "10px 12px", fontWeight: 600, fontSize: 13, opacity: 0.8 } }, config.title),
160
+ topics.length === 0 ? (0, import_react.createElement)(
161
+ "div",
162
+ { style: { padding: "8px 12px", opacity: 0.6, fontSize: 12, lineHeight: 1.6 } },
163
+ config.designMode ? "\u8FD8\u6CA1\u6709\u8BBE\u8BA1\u4EFB\u52A1\u3002\u5728\u4F1A\u8BDD\u91CC\u7528 /gpt-image-design \u5F00\u59CB\u3002" : "\u8FD8\u6CA1\u6709\u7814\u7A76\u4EFB\u52A1\u3002\u5728\u4F1A\u8BDD\u91CC\u7528 /pro-research \u5F00\u59CB\u3002"
164
+ ) : topics.map((topic) => (0, import_react.createElement)(
165
+ "div",
166
+ {
167
+ key: topic.topic_id,
168
+ onClick: () => setSelected(topic.topic_id),
169
+ style: {
170
+ padding: "8px 12px",
171
+ cursor: "pointer",
172
+ background: topic.topic_id === selected ? "rgba(127,127,127,.12)" : "transparent",
173
+ borderBottom: "1px solid rgba(127,127,127,.12)"
174
+ }
175
+ },
176
+ (0, import_react.createElement)(
177
+ "div",
178
+ { style: { display: "flex", alignItems: "center", fontSize: 13, fontWeight: 500 } },
179
+ (0, import_react.createElement)(Dot, { status: topic.status }),
180
+ (0, import_react.createElement)("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, topic.title)
181
+ ),
182
+ (0, import_react.createElement)(
183
+ "div",
184
+ { style: { fontSize: 11, opacity: 0.65, marginLeft: 14, marginTop: 2 } },
185
+ `${STATUS_LABEL[topic.status] ?? topic.status} \xB7 ${topic.rounds}/${topic.rounds_cap} \u8F6E`
186
+ )
187
+ ))
188
+ );
189
+ const body = (0, import_react.createElement)(
190
+ "div",
191
+ { style: { flex: 1, overflowY: "auto", padding: 14, fontSize: 13, lineHeight: 1.6 } },
192
+ error !== void 0 ? (0, import_react.createElement)("div", { style: { color: "#c62828", marginBottom: 8 } }, `\u63A5\u53E3\u9519\u8BEF\uFF1A${error}`) : void 0,
193
+ detail === void 0 ? (0, import_react.createElement)("div", { style: { opacity: 0.6 } }, "\u9009\u62E9\u5DE6\u4FA7\u7684\u4E3B\u9898\u67E5\u770B\u8F6E\u6B21\u4E0E\u4EA7\u7269\u3002") : (0, import_react.createElement)(
194
+ "div",
195
+ {},
196
+ (0, import_react.createElement)("h3", { style: { margin: "0 0 6px", fontSize: 15 } }, detail.title),
197
+ (0, import_react.createElement)(
198
+ "div",
199
+ { style: { opacity: 0.75, marginBottom: 8 } },
200
+ `${STATUS_LABEL[detail.status] ?? detail.status} \xB7 ${detail.rounds}/${detail.rounds_cap} \u8F6E \xB7 ${detail.type}`
201
+ ),
202
+ detail.stall_reason !== null ? (0, import_react.createElement)("div", { style: { color: "#ed6c02", marginBottom: 8 } }, `\u5361\u4F4F\u539F\u56E0\uFF1A${detail.stall_reason}`) : void 0,
203
+ detail.stop_reason !== null ? (0, import_react.createElement)("div", { style: { marginBottom: 8 } }, `\u505C\u6B62\u4F9D\u636E\uFF1A${detail.stop_reason}`) : void 0,
204
+ detail.path !== void 0 ? (0, import_react.createElement)("div", { style: { opacity: 0.65, marginBottom: 8, wordBreak: "break-all" } }, `\u8BB0\u5F55\uFF1A${detail.path}`) : void 0,
205
+ (0, import_react.createElement)(
206
+ "div",
207
+ { style: { display: "flex", gap: 8, flexWrap: "wrap", marginBottom: 12 } },
208
+ ACTIVE.has(detail.status) ? (0, import_react.createElement)("button", { onClick: () => void act("cancel"), style: buttonStyle() }, "\u53D6\u6D88") : void 0,
209
+ detail.status === "stalled" || detail.status === "failed" ? (0, import_react.createElement)("button", { onClick: () => void act("resume"), style: buttonStyle() }, "\u6062\u590D") : void 0,
210
+ detail.status === "stalled" ? (0, import_react.createElement)(
211
+ "span",
212
+ { style: { display: "flex", gap: 8 } },
213
+ (0, import_react.createElement)("button", { onClick: () => void act("human_check", "submitted"), style: buttonStyle() }, "\u5DF2\u63D0\u4EA4"),
214
+ (0, import_react.createElement)("button", { onClick: () => void act("human_check", "not_submitted"), style: buttonStyle() }, "\u672A\u63D0\u4EA4"),
215
+ (0, import_react.createElement)("button", { onClick: () => void act("human_check", "reopen"), style: buttonStyle() }, "\u9700\u91CD\u5F00")
216
+ ) : void 0
217
+ ),
218
+ (0, import_react.createElement)("div", { style: { fontWeight: 600, marginBottom: 4 } }, "\u8F6E\u6B21"),
219
+ (detail.rounds_detail ?? []).length === 0 ? (0, import_react.createElement)("div", { style: { opacity: 0.6 } }, "\u8FD8\u6CA1\u6709\u63D0\u4EA4\u8BB0\u5F55\u3002") : (0, import_react.createElement)(
220
+ "table",
221
+ { style: { width: "100%", borderCollapse: "collapse", fontSize: 12 } },
222
+ (0, import_react.createElement)("thead", {}, (0, import_react.createElement)(
223
+ "tr",
224
+ {},
225
+ ["\u8F6E", "\u88C1\u51B3", "\u6587\u4EF6", "\u63D0\u4EA4\u65F6\u95F4"].map((label) => (0, import_react.createElement)("th", {
226
+ key: label,
227
+ style: { textAlign: "left", padding: "4px 6px", borderBottom: "1px solid rgba(127,127,127,.25)", opacity: 0.7, fontWeight: 500 }
228
+ }, label))
229
+ )),
230
+ (0, import_react.createElement)("tbody", {}, (detail.rounds_detail ?? []).map((round) => (0, import_react.createElement)(
231
+ "tr",
232
+ { key: round.n },
233
+ (0, import_react.createElement)("td", { style: cellStyle() }, String(round.n)),
234
+ (0, import_react.createElement)("td", { style: cellStyle() }, round.verdict ?? "\u2014"),
235
+ (0, import_react.createElement)("td", { style: cellStyle() }, String(round.files)),
236
+ (0, import_react.createElement)("td", { style: cellStyle() }, round.submittedAt?.slice(0, 16).replace("T", " ") ?? "\u2014")
237
+ )))
238
+ ),
239
+ config.designMode && detail.designs != null ? (0, import_react.createElement)("div", { style: { marginTop: 8, opacity: 0.75 } }, `\u6BCF\u8F6E\u65B9\u5411\uFF1A${detail.designs}`) : void 0,
240
+ renderArtifacts(detail)
241
+ )
242
+ );
243
+ return (0, import_react.createElement)("div", { style: { display: "flex", height: "100%", minHeight: 0, color: "inherit" } }, list, body);
244
+ }
245
+ function assetUrl(topicId, path) {
246
+ return `${config.routes}/asset?id=${encodeURIComponent(topicId)}&path=${encodeURIComponent(path)}`;
247
+ }
248
+ function renderArtifacts(detail) {
249
+ const artifacts = detail.artifacts ?? [];
250
+ if (artifacts.length === 0) return void 0;
251
+ if (!config.designMode) {
252
+ return (0, import_react.createElement)("div", { style: { marginTop: 10, opacity: 0.75 } }, `\u4EA7\u7269\uFF1A${artifacts.join("\u3001")}`);
253
+ }
254
+ const images = artifacts.filter((path) => /\.(png|jpe?g|webp|gif|svg)$/i.test(path));
255
+ const demos = artifacts.filter((path) => /\.html?$/i.test(path));
256
+ return (0, import_react.createElement)(
257
+ "div",
258
+ { style: { marginTop: 14 } },
259
+ images.length > 0 ? (0, import_react.createElement)(
260
+ "div",
261
+ {},
262
+ (0, import_react.createElement)("div", { style: { fontWeight: 600, marginBottom: 6 } }, "\u56FE\u7247"),
263
+ (0, import_react.createElement)(
264
+ "div",
265
+ { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))", gap: 8 } },
266
+ images.map((path) => (0, import_react.createElement)("a", {
267
+ key: path,
268
+ href: assetUrl(detail.topic_id, path),
269
+ target: "_blank",
270
+ rel: "noreferrer"
271
+ }, (0, import_react.createElement)("img", {
272
+ src: assetUrl(detail.topic_id, path),
273
+ alt: path,
274
+ style: { width: "100%", borderRadius: 8, border: "1px solid rgba(127,127,127,.25)" }
275
+ })))
276
+ )
277
+ ) : void 0,
278
+ demos.length > 0 ? (0, import_react.createElement)(
279
+ "div",
280
+ { style: { marginTop: 12 } },
281
+ (0, import_react.createElement)("div", { style: { fontWeight: 600, marginBottom: 6 } }, "\u524D\u7AEF demo"),
282
+ demos.map((path) => (0, import_react.createElement)("iframe", {
283
+ key: path,
284
+ src: assetUrl(detail.topic_id, path),
285
+ sandbox: "allow-scripts",
286
+ title: path,
287
+ style: { width: "100%", height: 420, border: "1px solid rgba(127,127,127,.25)", borderRadius: 8, background: "#fff" }
288
+ }))
289
+ ) : void 0,
290
+ (0, import_react.createElement)("div", { style: { marginTop: 8, opacity: 0.6, fontSize: 11, wordBreak: "break-all" } }, artifacts.join("\u3001"))
291
+ );
292
+ }
293
+ function buttonStyle() {
294
+ return {
295
+ padding: "4px 10px",
296
+ borderRadius: 6,
297
+ border: "1px solid rgba(127,127,127,.35)",
298
+ background: "transparent",
299
+ color: "inherit",
300
+ cursor: "pointer",
301
+ fontSize: 12
302
+ };
303
+ }
304
+ function cellStyle() {
305
+ return { padding: "4px 6px", borderBottom: "1px solid rgba(127,127,127,.12)" };
306
+ }
307
+ function Icon({ kind }) {
308
+ const svg = kind === "design" ? DESIGN_ICON : RESEARCH_ICON;
309
+ return (0, import_react.createElement)("span", {
310
+ "aria-hidden": true,
311
+ style: { display: "inline-flex", width: 16, height: 16, lineHeight: 0, color: "inherit" },
312
+ dangerouslySetInnerHTML: { __html: svg }
313
+ });
314
+ }
315
+ function apply(ctx) {
316
+ ctx.slots.inject("main", () => ctx.slots.register({ name: "main", key: config.panelId }, () => (0, import_react.createElement)(Panel)));
317
+ ctx.slots.inject("sidebar.panellist", () => ctx.slots.register({ name: "sidebar.panellist", id: config.panelId, order: 21, label: () => config.label }, () => (0, import_react.createElement)(Icon, { kind: config.icon })));
318
+ }
319
+
320
+ // client/index.tsx
321
+ configure({
322
+ routes: "/chatgpt-pro-research",
323
+ panelId: "chatgpt-pro-research",
324
+ title: "ChatGPT Pro Research",
325
+ label: "Pro Research",
326
+ icon: "research",
327
+ designMode: false
328
+ });
329
+ return module.exports;
330
+ } });