gal-view README

The project's README from github.com/Ayase34/gal-view. As one markdown file: README.md.

gal-view · GAL 视窗

English | 中文

DSH Web GUI 会话页的 Galgame 风格对话视图 + 场景元素可视化编辑器(官方 bundle 插件格式)。

在会话标签页栏(「对话」/「轨迹」)中间加入 「GAL视窗」 标签,点开之后会话视窗变成 16:9 Galgame 舞台:占位立绘、大对话框、打字机台词、玩家输入;内置「编辑模式」可像场景 编辑器一样拖拽/改属性/换图层,编辑结果实时同步回游戏模式。

image.png

默认预设

仓库根 gal-scene.json 是随包分发的默认预设场景(编辑器导出的格式,内嵌被引用的图片/字体):首次打开「GAL视窗」且本地没有存档场景时自动加载,编辑模式的「重置」也回到该预设。更新预设:编辑场景 → Ctrl+S 导出 → 用导出的 gal-scene.json 替换仓库根同名文件 → npm run build:client 并提交。

安装

本插件以官方 bundle 格式分发,用一条 dsh plugin 命令安装到 web profile,装完重启 web 即可生效。

前置条件

从 GitHub 安装(一行命令)

dsh plugin --profile web add github:Ayase34/gal-view#main

#main 表示使用仓库的 main 分支;想锁定某个具体版本,可以换成提交哈希,例如 #ae73dca。

完成安装

安装后重启 web(bundle 层在启动时合成,必须重启才会加载插件)。重启后打开 Web GUI 的会话页,标签栏应出现 「GAL视窗」 标签(位于「对话」和「轨迹」之间)。

可选验证:执行 dsh --profile web --dump-config,输出中应能看到 # == gal-view 这一层,说明插件层已进入组合。

更新到新版本

dsh plugin --profile web update gal-view
# 更新后同样要重启 web

卸载

dsh plugin --profile web remove gal-view
# 卸载后同样要重启 web

说明:场景布局、素材图片、字体与阅读进度都保存在你的浏览器里(localStorage / IndexedDB),重装或卸载插件不会丢失;清除浏览器站点数据才会重置它们。

开发

pnpm install            # 安装 esbuild devDependency
npm test                # 纯逻辑单测(node:test,同进程运行)
npm run build:client    # 生成 .dsh-plugin/client.js(生成物勿手改)
npm run check:client    # 校验 client.js 新鲜度
npm run smoke           # Playwright 冒烟(需 DSH_CHECKOUT 指向 dsh checkout)

结构

.dsh-plugin/index.mjs     Node half(极简,无宿主行为)
.dsh-plugin/client/       client 源码:场景模型/打字机/转录映射/组件/样式
.dsh-plugin/client.js     构建产物(scripts/build-client.mjs 生成)
scripts/build-client.mjs  esbuild 构建器(--check 守护新鲜度)
tests/                    纯逻辑单测(node:test)

gal-view (Ayase34/gal-view)

Searching Database…

What is this?GAL View is a plugin for DeepSeek Harness (dsh) that turns the Web GUI chat session page into a Galgame-style visual novel interface, complete with character portraits, a big dialogue box, typewriter-style text, and a player input box.
Is this a standalone app or a plugin for dsh?It's an official bundle-format plugin for DeepSeek Harness, not a standalone app — it gets installed into the dsh web profile and only changes how the existing Web GUI session page is rendered.
Do I need DeepSeek Harness installed first?Yes — you need DeepSeek Harness already set up with a working dsh command in your terminal; if you run Harness from a source checkout, replace dsh with pnpm dsh in every command.
What happens to my scene edits if I update or uninstall the plugin?Nothing is lost: scene layout, images, fonts, and reading progress all live in your browser's localStorage/IndexedDB rather than in the plugin itself, so reinstalling or uninstalling won't wipe them — only clearing your browser's site data will.
What can I do in edit mode?Edit mode lets you work on the scene like in a scene editor: drag and reposition elements, change their properties, and swap image layers, with changes syncing live back into game mode.
Can I customize the default Galgame scene?Yes — edit the scene in the built-in editor, export with Ctrl+S to get an updated gal-scene.json, replace the file of the same name at the repo root, then run npm run build:client and commit.
Where does the GAL View tab show up?It's added to the session page's tab bar in the DSH Web GUI, sitting between the existing Dialogue (对话) and Trajectory (轨迹) tabs.
How do I confirm the plugin actually loaded?Run dsh --profile web --dump-config and check that the output includes a '# == gal-view' layer, which confirms the plugin has been composed into your config.
Creator
Ayase34
Size
10.4 MB
Stars
205
Updated
CommitAug 16
Age
2mo
Commits · 90 Days