Repository navigation
提示词出图:生成后页面内预览修复,模板库与交互升级 - #12
Merged
Merged
Conversation
模板按海报、电商、摄影、插画、Logo、3D、社交媒体、建筑、角色、信息图、 壁纸、自由创作 12 类重新整理,提示词改为更专业的英文描述; 新增风格 / 光影 / 镜头 / 画质修饰词与「避免出现」负面提示。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1br6DiRPeUBy6yqdGEZf1
- 解析 JSON / CSV / Markdown 提示词集合,{变量}、[变量]、{argument ...}
占位符自动变成可填写项
- 推荐两个开源提示词库(CC BY 4.0 / CC0),运行时由用户下载,保留署名与许可证
- 支持粘贴链接订阅、本地文件导入、刷新、停用、移除,导出我的模板
- 收藏与最近生成记录持久化到 settings 表
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1br6DiRPeUBy6yqdGEZf1
结果区原先在生成按钮下方,窗口高度不够时图片落在可视区外,自动滚动 也只滚到一半。改为三栏布局:模板库 / 编辑区 / 结果区各自滚动,结果区 常驻右侧,生成中显示等待秒数,完成后直接显示,点击可放大。桌面端改为 从已保存的本地文件加载预览,Web 端仍用图片字节。 同时:最终提示词可直接修改并可恢复自动;生成按钮固定在编辑区底部; 最近作品缩略图可回看并复用提示词;记住上次的来源、模板与增强项; 复制提示词改用 Clipboard 服务(0.84 已无 page.set_clipboard)。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1br6DiRPeUBy6yqdGEZf1
Flet 0.84 已移除 page.set_clipboard,原调用会抛 AttributeError。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1br6DiRPeUBy6yqdGEZf1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
提示词里仍写入英文选项值,界面显示中文名称。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1br6DiRPeUBy6yqdGEZf1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by ColeMao · project thread
Before: 生成完成后图片放在生成按钮下方,1280×800 窗口里落在可视区外,#10 加的自动滚动只滚到一半,看起来像"没有预览",只能去文件夹打开。模板只有 10 个,不能加外部提示词,也不能存自己的模板;复制提示词在 0.84 下会失败。
After: 三栏布局(模板库 / 编辑区 / 结果区),结果区常驻右侧,生成中显示等待秒数,完成后直接显示,点击放大;下方是最近作品缩略图,可回看、复用提示词。模板扩充到 31 个、12 个分类,带风格增强(风格 / 光影 / 镜头 / 画质)和"避免出现"。可一键订阅两个开源提示词库,也能粘贴链接或导入本地 JSON / CSV / Markdown;可以把提示词存为"我的模板"(
{变量}自动变成填写项)、收藏、导出分享。在容器里用 Flet 0.84 桌面客户端(Xvfb)复现了旧版问题:1024×1536 大图生成后只露出顶部一小截。新版同样条件下图片完整显示在右栏,浅色 / 深色都验证过。
How
core/prompt_image/templates.py:重写内置模板,提示词改为更专业的英文描述;assemble_prompt清理可选字段留空后的空引号。core/prompt_image/modifiers.py:风格增强修饰词。core/prompt_image/sources.py:JSON / CSV / Markdown 解析,识别{变量}、[变量]、{argument name=... default=...}占位符;推荐源只记录地址,运行时由用户下载,保留作者、原文链接与许可证(Awesome GPT-4o Images,CC BY 4.0;Awesome GPT Image 2 Prompts,CC0)。仓库里没有打包第三方提示词正文。services/prompt_library_service.py:订阅源、我的模板、收藏、生成历史,都存在 settings 表的 JSON 里,没有改表结构。ui/pages/prompt_image_page.py:页面重写。桌面端从已保存的本地文件加载预览,Web 端仍用字节;生成按钮固定在编辑区底部;最终提示词可直接改,也能一键恢复自动生成。ui/pages/ocr_page.py:复制改用ft.Clipboard()(0.84 没有page.set_clipboard)。pytest共 61 项通过,ruff check通过。🤖 Generated with Claude Code
https://claude.ai/code/session_01V1br6DiRPeUBy6yqdGEZf1
Generated by Claude Code