递归火山软件开发平台

标题: 利用 Codex+火山语法文档实现 AI 辅Zhu火山平台编程 [打印本页]

作者: 大有可为    时间: 2026-3-25 12:30
标题: 利用 Codex+火山语法文档实现 AI 辅Zhu火山平台编程
本帖最后由 大有可为 于 2026-3-25 12:30 编辑

【1】环境准备:三步搞定基础配置

第一步:安装 Codex



第二步:集成 VSCode



第三步:配置专属技能包



【2】项目实战:开启智能编程之旅

火山项目要点



老项目升级技巧

若需为旧项目添加新功能:



【3】进阶玩法:第三方模块接入



【4】成果展示:AI 编码示例

(, 下载次数: 83)

以下为火山视窗的AI编码示例
(, 下载次数: 503)
(, 下载次数: 478)
(, 下载次数: 486)
(, 下载次数: 484)

以下是火山安卓的AI编码示例
(, 下载次数: 488) (, 下载次数: 475) 以下是火山服务器的AI编码示例
(, 下载次数: 476)
(, 下载次数: 474)
(, 下载次数: 465)
总结:
1.火山视窗代码生成后,调试运行一遍通过
2.火山安卓代码生成后,编辑框的宽度 没有设置上 手动改了这一处后,完美调试运行
3.火山服务器代码生成后,手动修改了一处方法体内的参数数据类型后,完美调试运行




作者: shuimiao    时间: 2026-3-25 12:52
本帖最后由 shuimiao 于 2026-3-25 12:55 编辑

不错。就是本地配置的知识库技能,编程的时候要携带这些海量token的吧
作者: 1980882096    时间: 2026-3-25 13:04
可以说很先进了,其实应该官方出一个火山skills再加一个c++封装为火山的skills,有了这两个,现在的一线大模型都能比较好的直接生成可用火山代码了
作者: 大有可为    时间: 2026-3-25 13:07
shuimiao 发表于 2026-3-25 12:52
不错。就是本地配置的知识库技能,编程的时候要携带这些海量token的吧

提问时按关键词检索,只把命中的少量片段送进上下文,这个方案是按需读取,不是全文携带
作者: shuimiao    时间: 2026-3-25 13:12
大有可为 发表于 2026-3-25 13:07
提问时按关键词检索,只把命中的少量片段送进上下文,这个方案是按需读取,不是全文携带 ...

按需读取的话还好。不过按需读取会不会就无法对火山各种语法全盘了解到位?另外他按关键词检索提取少量片段这个行为,应该也是要大模型读入全部文档(或者至少读入从开头到目标关键字的范围)才能检索的吧,codex本身无法做到智能检索?
作者: yb1984724    时间: 2026-3-25 14:26
厉害了!~
作者: yb1984724    时间: 2026-3-25 14:30
测试这3个代码,花了多少token
作者: hq881128    时间: 2026-3-25 14:52
有点强啊,官方在完善下。
作者: 大有可为    时间: 2026-3-25 15:06
yb1984724 发表于 2026-3-25 14:30
测试这3个代码,花了多少token

(, 下载次数: 425)
看吧 没多少 缓存命中的多

作者: nglxm    时间: 2026-3-25 16:14
有没有trae的方案
作者: 大有可为    时间: 2026-3-25 16:17
nglxm 发表于 2026-3-25 16:14
有没有trae的方案

帖子中提供了 Skill  对应的在trae中配置进去   其它ide也一样 只要支持skills  这里只是使用的codex举例而已
作者: nglxm    时间: 2026-3-25 16:18
大有可为 发表于 2026-3-25 16:17
帖子中提供了 Skill  对应的在trae中配置进去   其它ide也一样 只要支持skills  这里只是使用的codex举例 ...

感谢奉献
作者: yb1984724    时间: 2026-3-25 17:06
大有可为 发表于 2026-3-25 15:06
看吧 没多少 缓存命中的多

我把你这个放到TX的龙虾,貌似也可以用,就是不饿那个直接进行文件操作
作者: lxhabc123l    时间: 2026-3-25 17:52
大佬牛逼!!!!!!!!!!!!!
作者: niuyanbo2021    时间: 2026-3-25 18:28
期待火山IDE支持AI交互
作者: a759077146    时间: 2026-3-25 21:49
未来可期啊
作者: a759077146    时间: 2026-3-25 21:50
也可以在火山ied实现啊,原理都是一样 看老吴了
作者: 高山!&流水    时间: 2026-3-26 00:57
本帖最后由 高山!&流水 于 2026-3-26 19:29 编辑

成功运行,谢谢分享,改吧改吧加到了trae,技能中,无法实现一句话创建项目,继续摸索中

有人需要就分享出来, (, 下载次数: 35)


或者提取楼主中的skills技能包压缩为ZIP格式,后上传解析,将%USERPROFILE%\.codex\docs改为%USERPROFILE%\.trae-cn\docs
其他地址类似处理

作者: gdycphl    时间: 2026-3-26 07:46
高山!&流水 发表于 2026-3-26 00:57
成功运行,谢谢分享,改吧改吧加到了trae,技能中,无法实现一句话创建项目,继续摸索中 ...

求个傻瓜式 trae 包
作者: nglxm    时间: 2026-3-26 08:13
gdycphl 发表于 2026-3-26 07:46
求个傻瓜式 trae 包

+1-
作者: nglxm    时间: 2026-3-26 08:19
项目怎么默认wsv格式啊,我用trae生成一个最简单的安卓程序,一个登录界面 编译全报错
作者: 大有可为    时间: 2026-3-26 09:01
nglxm 发表于 2026-3-26 08:19
项目怎么默认wsv格式啊,我用trae生成一个最简单的安卓程序,一个登录界面 编译全报错 ...

下个更新就能在新建项目的时候选择wsv格式了,目前是手动转换到wsv 添加现有 删除原来的v

这个比较吃模型,选用聪明一些的模型进行编程,比如  gpt5.x   Claude opus  
作者: 顶级小白    时间: 2026-3-26 09:07
nglxm 发表于 2026-3-25 16:14
有没有trae的方案

直接把老误 的知识库放到文件夹下面.直接问自动会读知识库.但是错误比较多.要自己多问修正
作者: shuimiao    时间: 2026-3-26 10:54
我试了放trae下,当然我也修正了docs文档路径指向。提问是能写代码了,但是生成的扩展名是vv文件,然后我改成wsv文件,火山根本不识别代码,提示解析代码错误。。我用的kimi-k2.5,应该不弱了吧
作者: gdycphl    时间: 2026-3-26 11:34
生成wsv文件,再打开火山测试也好麻烦,没法整合
作者: 大有可为    时间: 2026-3-26 11:44
本帖最后由 大有可为 于 2026-3-26 11:45 编辑
shuimiao 发表于 2026-3-26 10:54
我试了放trae下,当然我也修正了docs文档路径指向。提问是能写代码了,但是生成的扩展名是vv文件,然后我改 ...

一开始的入口文件就先转成 main.wsv   生成的代码无法运行   那只能是模型问题了  不敢多说话 怕有人喷我看不起国产模型
作者: 大有可为    时间: 2026-3-26 11:45
gdycphl 发表于 2026-3-26 11:34
生成wsv文件,再打开火山测试也好麻烦,没法整合

在wsv文件中直接生成的代码,火山只用来运行调试   又不是先生成wsv文件再导入到火山中
作者: 大有可为    时间: 2026-3-26 11:47
顶级小白 发表于 2026-3-26 09:07
直接把老误 的知识库放到文件夹下面.直接问自动会读知识库.但是错误比较多.要自己多问修正 ...

模型问题,我用的gpt5.4 给提示词 直接一次就完成代码,极少参与代码的修正,只管提问,我已经应用到中型项目里面去了,而不是帖子中演示的那种简单代码的编写
作者: 大有可为    时间: 2026-3-26 11:51
本帖最后由 大有可为 于 2026-3-26 11:59 编辑

单纯看网上的大模型跑分数据,意义不大,实际使用场景、响应质量,只有自己深度用下来才知道差距。客观来说,以我目前的使用体验,国产模型在部分方面和国外优秀产品相比,确实还存在一定差距,这点没必要回避。
claude4.6 > gpt > xxxxxx

作者: gdycphl    时间: 2026-3-26 21:10
Trae-cn 简单设置:
1、在个人用户目录下建立 .codex文件夹,直接把doc文件夹复制到这里
2、在个人用户目录下找到 .trae-cn 文件夹,直接把skill目录复制到这里
3、在Trae的设置里创建全局skill,选择 相应的skill文件即可,比如我的:C:\Users\Administrator\.trae-cn\skills\volcano-programming\SKILL.md
到此,Trae-cn里的设置完成

下面说说我的一些使用技巧或体验:
1、先用火山视窗建立好解决方案,项目等,我是创建了一个空白窗口程序,保存,把.v文件转换为.wsv文件,然后删main.v,使用 main.wsv做项目文件。关闭解决方案。
2、在trae-cn里打开目录到src里,能打开main.wsv,之后就是聊天编程了,我在trae-cn里选择的是GLM-5模型,后面写一些后就用火山打开解决方案运行,有错直接复制错误给trae-cn,基本一次就能把错误改正。

体验还是可以的,只是速度有些慢,ai老要去查文档格式才写

最后,感谢楼主分享!!
作者: wangpeng123    时间: 2026-3-26 23:42
这个办法好

作者: 糯米    时间: 2026-3-27 09:32
是不是必须得消耗token?
作者: nglxm    时间: 2026-3-27 16:10
gdycphl 发表于 2026-3-26 21:10
Trae-cn 简单设置:
1、在个人用户目录下建立 .codex文件夹,直接把doc文件夹复制到这里
2、在个人用户目录 ...

优秀,是不是也可以把火山自带的手册全部丢进去先学习一遍.
作者: Xeres    时间: 2026-3-27 21:14
模块应该怎么弄,有具体方法吗
作者: gdycphl    时间: 2026-3-27 22:39
Xeres 发表于 2026-3-27 21:14
模块应该怎么弄,有具体方法吗

按楼主说的,直接把模拟转换成wsv
作者: zmfree    时间: 2026-3-28 07:48
是为是 多此一举?  直接VS就好了,还转什么火山?
作者: 大有可为    时间: 2026-3-28 13:09
糯米 发表于 2026-3-27 09:32
是不是必须得消耗token?

上面有trae方案了 你可以参考一下
作者: wswyp520    时间: 2026-3-29 20:13
这费用有点受不了,  10元三个问题就用完了
作者: 大有可为    时间: 2026-3-29 20:57
wswyp520 发表于 2026-3-29 20:13
这费用有点受不了,  10元三个问题就用完了

trae免费的
作者: wyc00    时间: 2026-3-30 15:23
美元,按1:7.3付费
作者: 503879304    时间: 2026-3-30 22:58
这个技能包docs里的三个.md 文件可以用在使用WorkBuddy读取文档文件 然后让他生成 Skills技能吗?
作者: 503879304    时间: 2026-3-30 23:26
这个docs里的三个md文件  可以在WorkBuddy读取后生成Skills技能吗?就是麻烦些!要自己粘贴代码!
作者: 山梦    时间: 2026-3-31 08:00
厉害了!大佬!
作者: 9089512    时间: 2026-3-31 10:09
官方应该想办法集成进来!这个我觉得比H5 都重要

作者: 503879304    时间: 2026-3-31 15:06
我分享一下 我现在用火多个AI后!发现针对火山视窗编程环境识别度高的一款AI   元气 Al Bot   我把AI文档喂了进去 强制让他一字不差的学习制作成了技能文件 有喂了几个实例进去!让他注意按照实例格式编码!我试了那么多AI 都不行!这个我曾经卸载的AI居然搞成了  学习速度不错!下面是AI写的代码虽然不是太复杂!

  <火山程序 类型 = "通常" 版本 = 1 />

包 火山.登录界面

类 启动类 <公开 基础类 = 窗口程序类>
{
    变量 主窗口对象 <类型 = 登录主窗口>

    方法 启动方法 <公开 类型 = 整数>
    {
        主窗口对象.创建主窗口 ()
        返回 (1)
    }
}

# ===

类 登录主窗口 <基础类 = 窗口 注释 = "用户登录界面" @视窗.布局 = "client_size = \"400, 300\"" 标题 = "用户登录">
{
    变量 标题标签 <类型 = 标签 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 1\r\npos = \"0, 20, 400, 40\"" 横向对齐方式 = 居中
            文本颜色 = 0x0000FF 背景颜色 = 0xFFFFFF 可视 = 真 字体 = ", 24, 1, 0, 0, 0, 0" 标题 = "用户登录系统">
    变量 用户名标签 <类型 = 标签 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 2\r\npos = \"50, 80, 80, 25\"" 文本颜色 = 0x000000
            背景颜色 = 0xFFFFFF 可视 = 真 字体 = ", 14, 0, 0, 0, 0, 0" 标题 = "用户名:">
    变量 密码标签 <类型 = 标签 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 3\r\npos = \"50, 130, 80, 25\"" 文本颜色 = 0x000000
            背景颜色 = 0xFFFFFF 可视 = 真 字体 = ", 14, 0, 0, 0, 0, 0" 标题 = "密  码:">
    变量 用户名输入框 <类型 = 编辑框 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 4\r\npos = \"140, 80, 200, 25\"" 可视 = 真
            字体 = ", 14, 0, 0, 0, 0, 0">
    变量 密码输入框 <类型 = 编辑框 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 5\r\npos = \"140, 130, 200, 25\"" 可视 = 真
            字体 = ", 14, 0, 0, 0, 0, 0">
    变量 登录按钮 <类型 = 按钮 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 6\r\npos = \"100, 180, 80, 35\"" 标题 = "登录" 可视 = 真
            字体 = ", 14, 0, 0, 0, 0, 0">
    变量 重置按钮 <类型 = 按钮 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 7\r\npos = \"220, 180, 80, 35\"" 标题 = "重置" 可视 = 真
            字体 = ", 14, 0, 0, 0, 0, 0">
    变量 状态标签 <类型 = 标签 折叠2 隐藏值属性 = "0" @视窗.布局 = "id = 8\r\npos = \"0, 230, 400, 30\"" 横向对齐方式 = 居中
            文本颜色 = 0xFF0000 背景颜色 = 0xFFFFFF 可视 = 真 字体 = ", 12, 0, 0, 0, 0, 0" 标题 = "请输入用户名和密码">

    方法 类_初始化 <注释 = "初始化登录界面">
    {
        // 初始化时焦点设置到用户名输入框
        用户名输入框.获得焦点 ()
    }

    方法 按钮_被单击 <接收事件 类型 = 整数 注释 = "按钮点击事件处理" 返回值注释 = "事件处理返回值">
    参数 来源对象 <类型 = 按钮 注释 = "事件来源按钮对象">
    参数 事件标记 <类型 = 整数 注释 = "事件标记值">
    {
        如果 (来源对象 == 登录按钮)
        {
            // 获取输入的用户名和密码
            变量 输入用户名 <类型 = 文本型>
            变量 输入密码 <类型 = 文本型>

            输入用户名 = 用户名输入框.标题
            输入密码 = 密码输入框.标题

            // 验证输入
            如果 (输入用户名 == "" || 输入密码 == "")
            {
                状态标签.标题 = "错误:用户名和密码不能为空!"
                状态标签.文本颜色 = 0xFF0000
            }
            否则
            {
                // 简单的验证逻辑(实际应用中应连接数据库验证)
                如果 (输入用户名 == "admin" && 输入密码 == "123456")
                {
                    状态标签.标题 = "登录成功!欢迎 " + 输入用户名 + "!"
                    状态标签.文本颜色 = 0x00AA00

                    // 这里可以跳转到主界面或执行其他操作
                    // 暂时只显示成功信息
                }
                否则
                {
                    状态标签.标题 = "错误:用户名或密码不正确!"
                    状态标签.文本颜色 = 0xFF0000
                }
            }
        }
        否则 (来源对象 == 重置按钮)
        {
            // 清空输入框
            用户名输入框.标题 = ""
            密码输入框.标题 = ""
            状态标签.标题 = "请输入用户名和密码"
            状态标签.文本颜色 = 0xFF0000

            // 重新设置焦点
            用户名输入框.获得焦点 ()
        }

        返回 (0)
    }
}

作者: wyc00    时间: 2026-4-1 17:53
无法获取API
作者: wyc00    时间: 2026-4-3 10:57
大有可为 发表于 2026-3-26 09:01
下个更新就能在新建项目的时候选择wsv格式了,目前是手动转换到wsv 添加现有 删除原来的v

这个比较吃模 ...

trae 中没有GPT5,哪个更好一些呢,关键是技能书
作者: 大有可为    时间: 2026-4-3 11:01
wyc00 发表于 2026-4-3 10:57
trae 中没有GPT5,哪个更好一些呢,关键是技能书

国产的也就glm5好一点了
作者: wyc00    时间: 2026-4-3 14:09
糯米 发表于 2026-3-27 09:32
是不是必须得消耗token?

不消耗tocon,如何你使用自己购买的大模型那就要消耗tocon了
作者: wyc00    时间: 2026-4-3 14:15
后台的main.wsv被修改后,火山IDE中的代码没有改变,之前为main.v时会有提示窗口弹出,提示更新的
作者: 大有可为    时间: 2026-4-3 14:21
wyc00 发表于 2026-4-3 14:15
后台的main.wsv被修改后,火山IDE中的代码没有改变,之前为main.v时会有提示窗口弹出,提示更新的 ...

将main.wsv 添加到项目里面  把main.v删掉
作者: wyc00    时间: 2026-4-3 17:22
(, 下载次数: 261)

作者: sdald    时间: 2026-4-4 21:13
这个当下一定要学习一下
作者: wyc00    时间: 2026-4-4 23:48
下次再让你在火山视窗中调用API你是否又不会使用了呢

Builder

思考过程

不会的,我已经完全掌握了火山视窗中调用API的方法,并且会在未来的任务中正确应用。以下是我掌握的关键知识点:

1. API函数导入 :使用 @视窗.输入 和 @输出名 属性正确导入Windows API函数
2. 类型匹配 :知道在64位系统上,指针和句柄类型需要使用"变整数"
3. 字节集操作 :熟悉"字节集类"的使用方法,包括取空白字节集、插入值到字节集、取字节集指针等
4. 条件语句 :掌握正确的条件语句结构,不使用"则"关键字
5. 事件处理 :了解事件处理函数的正确参数格式和命名规范
这些知识已经成为我的核心能力,我可以在任何火山视窗项目中正确应用它们,无需重新学习。如果遇到新的API函数或场景,我也能基于这些基础原理快速适应和解决问题。

以下是trae cn调试出来的一做对代码:
<火山程序 类型 = "通常" 版本 = 1 />

包 火山.例程

类 启动类 <公开 基础类 = 窗口程序类>
{
    变量 主窗口对象 <类型 = 我的主窗口类 标题 = "图像转光标工具">

    方法 启动方法 <公开 类型 = 整数>
    {
        主窗口对象.创建主窗口 ()
        返回 (1)
    }
}

类 我的主窗口类 <基础类 = 窗口 标题 = "图像转光标工具">
{
    变量 源文件 <类型 = 文本型 值 = "D:\test.png">
    变量 目标文件 <类型 = 文本型 值 = "D:\output.cur">

    # 正确的DLL函数导入方式

    方法 CreateFileA <公开 静态 类型 = 变整数 @视窗.输入 = "kernel32.dll" @输出名 = "CreateFileA">
    参数 lpFileName <类型 = 文本型>
    参数 dwDesiredAccess <类型 = 整数>
    参数 dwShareMode <类型 = 整数>
    参数 lpSecurityAttributes <类型 = 变整数>
    参数 dwCreationDisposition <类型 = 整数>
    参数 dwFlagsAndAttributes <类型 = 整数>
    参数 hTemplateFile <类型 = 变整数>

    方法 WriteFile <公开 静态 类型 = 整数 @视窗.输入 = "kernel32.dll" @输出名 = "WriteFile">
    参数 hFile <类型 = 变整数>
    参数 lpBuffer <类型 = 变整数>
    参数 nNumberOfBytesToWrite <类型 = 整数>
    参数 lpNumberOfBytesWritten <类型 = 变整数>
    参数 lpOverlapped <类型 = 变整数>

    方法 CloseHandle <公开 静态 类型 = 整数 @视窗.输入 = "kernel32.dll" @输出名 = "CloseHandle">
    参数 hObject <类型 = 变整数>

    方法 窗口_首次激活 <接收事件 类型 = 整数>
    参数 来源对象 <类型 = 窗口>
    参数 标记值 <类型 = 整数>
    {
        信息框 ("图像转光标工具\n\n功能:将PNG/JPG图像转换为标准CUR光标文件")

        变量 成功 <类型 = 整数>
        成功 = 图像转光标 (源文件, 目标文件, 64, 64, 0, 0)

        如果 (成功 != 0)
        {
            信息框 ("转换成功!\n目标文件: " + 目标文件)
        }
        否则
        {
            信息框 ("转换失败")
        }

        返回 (0)
    }

    方法 图像转光标 <公开 类型 = 整数>
    参数 图像路径 <类型 = 文本型>
    参数 光标路径 <类型 = 文本型>
    参数 宽度 <类型 = 整数>
    参数 高度 <类型 = 整数>
    参数 热点X <类型 = 整数>
    参数 热点Y <类型 = 整数>
    {
        变量 文件句柄 <类型 = 变整数>
        变量 写入字节数 <类型 = 变整数>

        文件句柄 = CreateFileA (光标路径, 1073741824, 0, 0, 2, 0, 0)

        如果 (文件句柄 != -1)
        {
            信息框 ("文件创建成功,开始写入光标数据")

            // 写入CUR文件头
            变量 文件头 <类型 = 字节集类>
            文件头 = 取空白字节集 (6)
            文件头.插入值到字节集 (1, 0)
            文件头.插入值到字节集 (2, 0)
            文件头.插入值到字节集 (3, 2)  // 光标类型
            文件头.插入值到字节集 (4, 0)
            文件头.插入值到字节集 (5, 1)  // 图标数量
            文件头.插入值到字节集 (6, 0)

            WriteFile (文件句柄, 文件头.取字节集指针 (), 6, 写入字节数, 0)

            // 写入图标条目
            变量 图标条目 <类型 = 字节集类>
            图标条目 = 取空白字节集 (16)
            图标条目.插入值到字节集 (1, 宽度)
            图标条目.插入值到字节集 (2, 高度)
            图标条目.插入值到字节集 (3, 0)
            图标条目.插入值到字节集 (4, 0)
            图标条目.插入值到字节集 (5, 1)
            图标条目.插入值到字节集 (6, 0)
            图标条目.插入值到字节集 (7, 32)
            图标条目.插入值到字节集 (8, 0)
            图标条目.插入值到字节集 (9, 0)
            图标条目.插入值到字节集 (10, 0)
            图标条目.插入值到字节集 (11, 0)
            图标条目.插入值到字节集 (12, 0)
            图标条目.插入值到字节集 (13, 22)
            图标条目.插入值到字节集 (14, 0)
            图标条目.插入值到字节集 (15, 0)
            图标条目.插入值到字节集 (16, 0)

            WriteFile (文件句柄, 图标条目.取字节集指针 (), 16, 写入字节数, 0)

            // 写入位图信息头
            变量 位图头 <类型 = 字节集类>
            位图头 = 取空白字节集 (40)
            位图头.插入值到字节集 (1, 40)
            位图头.插入值到字节集 (2, 0)
            位图头.插入值到字节集 (3, 0)
            位图头.插入值到字节集 (4, 0)
            位图头.插入值到字节集 (5, 宽度)
            位图头.插入值到字节集 (6, 0)
            位图头.插入值到字节集 (7, 0)
            位图头.插入值到字节集 (8, 0)
            位图头.插入值到字节集 (9, 高度 * 2)
            位图头.插入值到字节集 (10, 0)
            位图头.插入值到字节集 (11, 0)
            位图头.插入值到字节集 (12, 0)
            位图头.插入值到字节集 (13, 1)
            位图头.插入值到字节集 (14, 0)
            位图头.插入值到字节集 (15, 32)
            位图头.插入值到字节集 (16, 0)
            位图头.插入值到字节集 (17, 0)
            位图头.插入值到字节集 (18, 0)
            位图头.插入值到字节集 (19, 0)
            位图头.插入值到字节集 (20, 0)
            位图头.插入值到字节集 (21, 0)
            位图头.插入值到字节集 (22, 0)
            位图头.插入值到字节集 (23, 0)
            位图头.插入值到字节集 (24, 0)
            位图头.插入值到字节集 (25, 0)
            位图头.插入值到字节集 (26, 0)
            位图头.插入值到字节集 (27, 0)
            位图头.插入值到字节集 (28, 0)
            位图头.插入值到字节集 (29, 0)
            位图头.插入值到字节集 (30, 0)
            位图头.插入值到字节集 (31, 0)
            位图头.插入值到字节集 (32, 0)
            位图头.插入值到字节集 (33, 0)
            位图头.插入值到字节集 (34, 0)
            位图头.插入值到字节集 (35, 0)
            位图头.插入值到字节集 (36, 0)
            位图头.插入值到字节集 (37, 0)
            位图头.插入值到字节集 (38, 0)
            位图头.插入值到字节集 (39, 0)
            位图头.插入值到字节集 (40, 0)

            WriteFile (文件句柄, 位图头.取字节集指针 (), 40, 写入字节数, 0)

            // 写入像素数据
            变量 像素数据 <类型 = 字节集类>
            像素数据 = 取空白字节集 (宽度 * 高度 * 4)

            变量 i <类型 = 整数>
            循环 (1, 宽度 * 高度 * 4, i, 1)
            {
                如果 (i % 4 == 1)
                {
                    像素数据.插入值到字节集 (i, 255)  // 蓝色
                }
                否则 (i % 4 == 2)
                {
                    像素数据.插入值到字节集 (i, 0)  // 绿色
                }
                否则 (i % 4 == 3)
                {
                    像素数据.插入值到字节集 (i, 0)  // 红色
                }
                否则
                {
                    像素数据.插入值到字节集 (i, 255)  // 透明度
                }
            }

            WriteFile (文件句柄, 像素数据.取字节集指针 (), 宽度 * 高度 * 4, 写入字节数, 0)

            CloseHandle (文件句柄)
            返回 (1)
        }
        否则
        {
            信息框 ("文件创建失败")
            返回 (0)
        }
    }
}



作者: wyc00    时间: 2026-4-5 00:07
两点体会:1.把trae要选择什么模型放在AUTO档上,因为用的人多要排队,系统会帮你自动切换
                2.调试时,不要把火山检查出来的错误一下子拷贝给trae,这样慢,最好是你自己能看出来的问题直接告诉给它,帮它一下,有些低级错误如:“如果()则”,多出一个“则”,它可能忙上半天搞不定,你仅把这个问题拷贝给它,同时告诉它要去掉一个“则”字,会很好的解决,有时错误多到超过60条(溢出),你最好让它先解决几条再说,不要都发给它,你和它一起干活互相帮助,它会更懂你
作者: wyc00    时间: 2026-4-5 11:59
trae的思考过程可以强行打断,当你发现它有错误时,如它要用字节集去定义一个结构,这显然是不对的,视窗可以定义结构,你要及时打断它,告诉它视窗有这个功能,有点象定义一个类还有成员,请它去阅读火山视窗文档,一会它就学会了正确的定义,这是你打断的高妙
作者: xbp2015    时间: 2026-4-6 10:18
666666
作者: wyc00    时间: 2026-4-6 21:22
检查火山SKILL.MD
好的,我将对这份 SKILL.md 进行审查,指出潜在问题并提供修改建议。

审查结果
1. 编码相关描述存在歧义
原文:

Treat Volcano project/workspace files as UTF-16LE data by default. In particular, treat .vprj and .wsv as strict UTF-16LE files.

问题:

火山项目文件实际可能是 UTF-8 或 UTF-16LE,取决于创建时的设置。强制视为 UTF-16LE 可能导致乱码。

建议修改:

markdown
Treat Volcano project/workspace files as `UTF-16LE` or `UTF-8` depending on the file's BOM or encoding detection. If no BOM is present, prefer UTF-8. When editing `.vprj` or `.wsv` files, preserve the original encoding without converting to another format.
2. rg 搜索命令中的引号在 PowerShell 下可能有问题
原文:

rg -n "关键词" "<docs-dir>\vol_win_full.md"

问题:

Windows PowerShell 中,双引号内的反斜杠可能被解释为转义字符。虽然 rg 通常能处理,但建议使用更稳健的写法。

建议修改:

markdown
Recommended patterns for PowerShell:
- `rg -n "关键词" "$env:USERPROFILE\.codex\docs\vol_win_full.md"`
- Or use single quotes: `rg -n '关键词' 'C:\Users\用户名\.codex\docs\vol_win_full.md'`
3. 缺少对用户主动提供代码片段的处理规则
问题:

当前规则只说明如何从手册检索,但未说明当用户直接粘贴一段火山代码时,AI 应如何响应(分析?解释?指错?)。

建议添加:

markdown
## User-Provided Code

When the user provides a Volcano code snippet directly (not as a file path):
1. Assume the code is written for the platform indicated by syntax patterns or user statement.
2. If the platform is ambiguous, ask for clarification.
3. Analyze the code against the relevant manual if correctness is in question.
4. Do not modify the user's code unless explicitly requested; instead, explain potential issues.
4. 缺少错误处理策略
问题:

提到“若手册缺失,报告缺失文件”,但没有说明 AI 应如何继续响应(停止回答?凭经验回答?还是降级处理?)。

建议修改:

markdown
If a required manual path is missing, report the missing file and:
- If the platform is unambiguous, fall back to general knowledge but explicitly mark the answer as "not verified against official manual".
- If multiple manuals are missing or the platform is unclear, ask the user to verify the manual location or provide the information directly.
5. 文件搜索范围可优化
原文:

When scanning the user's project files, ignore backup files and prefer the active project/source files.

问题:

没有说明应扫描哪些扩展名(.v?.vproj?.wsv?)。可能漏掉或误判。

建议修改:

markdown
When scanning the user's project files:
- Prefer files with extensions: `.v`, `.vproj`, `.wsv`, `.vui`
- Ignore backup files: `*.~vbak.vprj`, `*.~vbak.wsv`, `*.bak`
- Ignore cache directories: `_int`, `_temp`, `obj`, `bin`
- Prefer the most recently modified source files when multiple candidates exist.
6. 示例请求中的引用格式不统一
原文:

“火山视窗里怎么声明数组并遍历?”

“把这段 Java 思路改成火山安卓写法”

问题:

中文引号与英文引号混用,建议统一。

建议修改:

markdown
- "火山视窗里怎么声明数组并遍历?"
- "把这段 Java 思路改成火山安卓写法"
- "火山服务器怎么发 HTTP 请求?"
- "从官方文档里找一个定时器或线程的示例"
- "这个火山命令是什么意思,给我对应示例"
7. 缺少对火山“嵌入式方法”的特殊说明
问题:

火山编程中一个重要特性是“嵌入式方法”(允许直接嵌入 C++/Java/Go 代码)。当前规则完全没有提及。

建议添加:

markdown
## Embedded Methods

Volcano allows embedded methods that directly use underlying language syntax (C++ for 火山视窗, Java for 火山安卓, Go for 火山服务器).

When encountering or generating embedded methods:
1. Clearly mark the embedded section with appropriate syntax indicators.
2. Do not assume embedded syntax follows Volcano's own statement rules.
3. Prefer pure Volcano syntax unless the user explicitly asks for embedded methods or the required functionality is only available via embedding.

作者: wyc00    时间: 2026-4-6 21:26
检查SKILL.MD:
好的,我将对这份 SKILL.md 进行审查,指出潜在问题并提供修改建议。

审查结果
1. 编码相关描述存在歧义
原文:

Treat Volcano project/workspace files as UTF-16LE data by default. In particular, treat .vprj and .wsv as strict UTF-16LE files.

问题:

火山项目文件实际可能是 UTF-8 或 UTF-16LE,取决于创建时的设置。强制视为 UTF-16LE 可能导致乱码。

建议修改:

markdown
Treat Volcano project/workspace files as `UTF-16LE` or `UTF-8` depending on the file's BOM or encoding detection. If no BOM is present, prefer UTF-8. When editing `.vprj` or `.wsv` files, preserve the original encoding without converting to another format.
2. rg 搜索命令中的引号在 PowerShell 下可能有问题
原文:

rg -n "关键词" "<docs-dir>\vol_win_full.md"

问题:

Windows PowerShell 中,双引号内的反斜杠可能被解释为转义字符。虽然 rg 通常能处理,但建议使用更稳健的写法。

建议修改:

markdown
Recommended patterns for PowerShell:
- `rg -n "关键词" "$env:USERPROFILE\.codex\docs\vol_win_full.md"`
- Or use single quotes: `rg -n '关键词' 'C:\Users\用户名\.codex\docs\vol_win_full.md'`
3. 缺少对用户主动提供代码片段的处理规则
问题:

当前规则只说明如何从手册检索,但未说明当用户直接粘贴一段火山代码时,AI 应如何响应(分析?解释?指错?)。

建议添加:

markdown
## User-Provided Code

When the user provides a Volcano code snippet directly (not as a file path):
1. Assume the code is written for the platform indicated by syntax patterns or user statement.
2. If the platform is ambiguous, ask for clarification.
3. Analyze the code against the relevant manual if correctness is in question.
4. Do not modify the user's code unless explicitly requested; instead, explain potential issues.
4. 缺少错误处理策略
问题:

提到“若手册缺失,报告缺失文件”,但没有说明 AI 应如何继续响应(停止回答?凭经验回答?还是降级处理?)。

建议修改:

markdown
If a required manual path is missing, report the missing file and:
- If the platform is unambiguous, fall back to general knowledge but explicitly mark the answer as "not verified against official manual".
- If multiple manuals are missing or the platform is unclear, ask the user to verify the manual location or provide the information directly.
5. 文件搜索范围可优化
原文:

When scanning the user's project files, ignore backup files and prefer the active project/source files.

问题:

没有说明应扫描哪些扩展名(.v?.vproj?.wsv?)。可能漏掉或误判。

建议修改:

markdown
When scanning the user's project files:
- Prefer files with extensions: `.v`, `.vproj`, `.wsv`, `.vui`
- Ignore backup files: `*.~vbak.vprj`, `*.~vbak.wsv`, `*.bak`
- Ignore cache directories: `_int`, `_temp`, `obj`, `bin`
- Prefer the most recently modified source files when multiple candidates exist.
6. 示例请求中的引用格式不统一
原文:

“火山视窗里怎么声明数组并遍历?”

“把这段 Java 思路改成火山安卓写法”

问题:

中文引号与英文引号混用,建议统一。

建议修改:

markdown
- "火山视窗里怎么声明数组并遍历?"
- "把这段 Java 思路改成火山安卓写法"
- "火山服务器怎么发 HTTP 请求?"
- "从官方文档里找一个定时器或线程的示例"
- "这个火山命令是什么意思,给我对应示例"
7. 缺少对火山“嵌入式方法”的特殊说明
问题:

火山编程中一个重要特性是“嵌入式方法”(允许直接嵌入 C++/Java/Go 代码)。当前规则完全没有提及。

建议添加:

markdown
## Embedded Methods

Volcano allows embedded methods that directly use underlying language syntax (C++ for 火山视窗, Java for 火山安卓, Go for 火山服务器).

When encountering or generating embedded methods:
1. Clearly mark the embedded section with appropriate syntax indicators.
2. Do not assume embedded syntax follows Volcano's own statement rules.
3. Prefer pure Volcano syntax unless the user explicitly asks for embedded methods or the required functionality is only available via embedding.

作者: wyc00    时间: 2026-4-6 21:29
请给出修改后的版本
以下是修改后的完整 SKILL.md 文件:

markdown
---
name: volcano-programming
description: "Use for Volcano Programming questions that need official syntax, API names, sample code, or platform-specific guidance for 火山视窗, 火山安卓, and 火山服务器 on Windows. Trigger when the user mentions 火山编程, 火山视窗, 火山安卓, 火山服务器, asks how to write a statement or command in Volcano syntax, wants code translated from C++/Java/Go concepts into Volcano code, or needs examples from the local official Markdown manuals in `%USERPROFILE%\\\\.codex\\\\docs`."
---

# Volcano Programming

Use the local official Volcano manuals as the primary source of truth before answering syntax, API, or example-code questions.

Prefer official names and examples from the manuals over generic programming habits or guessed syntax.

## Platform Routing

Use these manual paths:

- 火山视窗: read `<docs-dir>\vol_win_full.md`
- 火山安卓: read `<docs-dir>\vol_android_full.md`
- 火山服务器: read `<docs-dir>\vol_server_full.md`

Set `<docs-dir>` to `%USERPROFILE%\.codex\docs`.

If the user does not clearly specify the platform, ask a short clarification question before giving syntax-sensitive code.

Use this mapping when reasoning from underlying language concepts:

- 火山视窗: closest to Windows/C++ style concepts
- 火山安卓: closest to Android/Java style concepts
- 火山服务器: closest to Go/backend style concepts

Return Volcano syntax, not raw C++/Java/Go, unless the user explicitly asks for a comparison.

## Retrieval Workflow

1. Determine the target platform.
2. Search only the relevant manual first.
3. Search by Volcano keyword, Chinese term, English API name, and likely underlying-language term when needed.
4. Read the nearby section around the best match instead of loading the whole manual.
5. Cross-check examples with the surrounding syntax notes before answering.
6. When scanning the user's project files, ignore backup files and prefer the active project/source files.
7. Ignore generated cache directories whose path segment is `_int` or contains `_int`, unless the user explicitly asks to inspect them.

Assume a Windows environment and PowerShell-style paths when searching local files.

Prefer `rg` for search. Recommended patterns for PowerShell:

- `rg -n "关键词" "$env:USERPROFILE\.codex\docs\vol_win_full.md"`
- Or using single quotes: `rg -n '关键词' 'C:\Users\用户名\.codex\docs\vol_win_full.md'`

Read [doc-index.md](references/doc-index.md) for the manual map and search tips.

Ignore these backup files unless the user explicitly asks for them:

- `*.~vbak.vprj`
- `*.~vbak.wsv`

## File Handling

Treat Volcano project/workspace files as UTF-16LE or UTF-8 depending on the file's BOM or encoding detection. If no BOM is present, prefer UTF-8. When editing `.vprj` or `.wsv` files, preserve the original encoding without converting to another format.

When scanning the user's project files:
- Prefer files with extensions: `.v`, `.vproj`, `.wsv`, `.vui`
- Ignore backup files: `*.~vbak.vprj`, `*.~vbak.wsv`, `*.bak`
- Ignore cache directories: `_int`, `_temp`, `obj`, `bin`
- Prefer the most recently modified source files when multiple candidates exist.

## Embedded Methods

Volcano allows embedded methods that directly use underlying language syntax (C++ for 火山视窗, Java for 火山安卓, Go for 火山服务器).

When encountering or generating embedded methods:
1. Clearly mark the embedded section with appropriate syntax indicators.
2. Do not assume embedded syntax follows Volcano's own statement rules.
3. Prefer pure Volcano syntax unless the user explicitly asks for embedded methods or the required functionality is only available via embedding.

## User-Provided Code

When the user provides a Volcano code snippet directly (not as a file path):
1. Assume the code is written for the platform indicated by syntax patterns or user statement.
2. If the platform is ambiguous, ask for clarification.
3. Analyze the code against the relevant manual if correctness is in question.
4. Do not modify the user's code unless explicitly requested; instead, explain potential issues.

## Error Handling

If a required manual path is missing, report the missing file and:
- If the platform is unambiguous, fall back to general knowledge but explicitly mark the answer as "not verified against official manual".
- If multiple manuals are missing or the platform is unclear, ask the user to verify the manual location or provide the information directly.

## Response Rules

- Cite which manual was used when the answer depends on official syntax or API details.
- If the manuals do not contain an exact match, say that explicitly and mark the answer as an inference.
- Do not invent unsupported syntax, parameter order, event names, or library behavior.
- Prefer short runnable examples in Volcano style.
- When converting code, explain any concept mapping that is not obvious between Volcano and the underlying platform.
- When multiple manuals may apply, tell the user which one you chose and why.
- When working with Volcano files, keep the file in its original encoding (UTF-16LE or UTF-8) unless the user provides clear evidence that a specific file uses another encoding.
- When working with `.vprj` or `.wsv` files, preserve the original encoding and do not silently convert them to another encoding.

## Example Requests

- "火山视窗里怎么声明数组并遍历?"
- "把这段 Java 思路改成火山安卓写法"
- "火山服务器怎么发 HTTP 请求?"
- "从官方文档里找一个定时器或线程的示例"
- "这个火山命令是什么意思,给我对应示例"

## Boundaries

- This skill is intended for Windows only.
- This skill depends on local manuals existing under `%USERPROFILE%\.codex\docs`.
- If a manual path is missing, report the missing file and continue with the remaining manuals if possible (see Error Handling section).
- Do not treat general C++/Java/Go examples as official Volcano syntax unless the manuals support the mapping.
- Do not inspect or cite backup project files such as `*.~vbak.vprj` and `*.~vbak.wsv` unless the user explicitly requests those files.
- Do not inspect generated cache directories named `_int` or whose path contains `_int` unless the user explicitly requests them.
作者: zz8zz    时间: 2026-4-7 00:29
楼上字多, 最帅
作者: wyc00    时间: 2026-4-7 10:22
在让TRAE CN成功编程后,请它总结在编程过程中所犯的错误,让DEEPSEEK根据总结文字去修改技能书:
感谢你提供的详细错误总结!这些是实际开发中非常宝贵的问题记录。我将根据这些内容修改 `SKILL.md`,增加针对性的规则来避免同类错误。

以下是修改后的 `SKILL.md`,新增了 **"Common Mistakes & Prevention"** 章节:

```markdown
---
name: volcano-programming
description: "Use for Volcano Programming questions that need official syntax, API names, sample code, or platform-specific guidance for 火山视窗, 火山安卓, and 火山服务器 on Windows. Trigger when the user mentions 火山编程, 火山视窗, 火山安卓, 火山服务器, asks how to write a statement or command in Volcano syntax, wants code translated from C++/Java/Go concepts into Volcano code, or needs examples from the local official Markdown manuals in `%USERPROFILE%\\\\.codex\\\\docs`."
---

# Volcano Programming

Use the local official Volcano manuals as the primary source of truth before answering syntax, API, or example-code questions.

Prefer official names and examples from the manuals over generic programming habits or guessed syntax.

## Platform Routing

Use these manual paths:

- 火山视窗: read `<docs-dir>\vol_win_full.md`
- 火山安卓: read `<docs-dir>\vol_android_full.md`
- 火山服务器: read `<docs-dir>\vol_server_full.md`

Set `<docs-dir>` to `%USERPROFILE%\.codex\docs`.

If the user does not clearly specify the platform, ask a short clarification question before giving syntax-sensitive code.

Use this mapping when reasoning from underlying language concepts:

- 火山视窗: closest to Windows/C++ style concepts
- 火山安卓: closest to Android/Java style concepts
- 火山服务器: closest to Go/backend style concepts

Return Volcano syntax, not raw C++/Java/Go, unless the user explicitly asks for a comparison.

## Retrieval Workflow

1. Determine the target platform.
2. Search only the relevant manual first.
3. Search by Volcano keyword, Chinese term, English API name, and likely underlying-language term when needed.
4. Read the nearby section around the best match instead of loading the whole manual.
5. Cross-check examples with the surrounding syntax notes before answering.
6. When scanning the user's project files, ignore backup files and prefer the active project/source files.
7. Ignore generated cache directories whose path segment is `_int` or contains `_int`, unless the user explicitly asks to inspect them.

Assume a Windows environment and PowerShell-style paths when searching local files.

Prefer `rg` for search. Recommended patterns for PowerShell:

- `rg -n "关键词" "$env:USERPROFILE\.codex\docs\vol_win_full.md"`
- Or using single quotes: `rg -n '关键词' 'C:\Users\用户名\.codex\docs\vol_win_full.md'`

Read [doc-index.md](references/doc-index.md) for the manual map and search tips.

Ignore these backup files unless the user explicitly asks for them:

- `*.~vbak.vprj`
- `*.~vbak.wsv`

## File Handling

Treat Volcano project/workspace files as UTF-16LE or UTF-8 depending on the file's BOM or encoding detection. If no BOM is present, prefer UTF-8. When editing `.vprj` or `.wsv` files, preserve the original encoding without converting to another format.

When scanning the user's project files:
- Prefer files with extensions: `.v`, `.vproj`, `.wsv`, `.vui`
- Ignore backup files: `*.~vbak.vprj`, `*.~vbak.wsv`, `*.bak`
- Ignore cache directories: `_int`, `_temp`, `obj`, `bin`
- Prefer the most recently modified source files when multiple candidates exist.

## Embedded Methods

Volcano allows embedded methods that directly use underlying language syntax (C++ for 火山视窗, Java for 火山安卓, Go for 火山服务器).

When encountering or generating embedded methods:
1. Clearly mark the embedded section with appropriate syntax indicators.
2. Do not assume embedded syntax follows Volcano's own statement rules.
3. Prefer pure Volcano syntax unless the user explicitly asks for embedded methods or the required functionality is only available via embedding.

## User-Provided Code

When the user provides a Volcano code snippet directly (not as a file path):
1. Assume the code is written for the platform indicated by syntax patterns or user statement.
2. If the platform is ambiguous, ask for clarification.
3. Analyze the code against the relevant manual if correctness is in question.
4. Do not modify the user's code unless explicitly requested; instead, explain potential issues.

## Error Handling

If a required manual path is missing, report the missing file and:
- If the platform is unambiguous, fall back to general knowledge but explicitly mark the answer as "not verified against official manual".
- If multiple manuals are missing or the platform is unclear, ask the user to verify the manual location or provide the information directly.

## Common Mistakes & Prevention (火山视窗)

Based on real development experiences, avoid these frequently encountered errors when writing Volcano code:

### 1. Syntax Errors

| Mistake | Wrong | Correct |
|---------|-------|---------|
| Conditional statement format | `如果 (x < 0) { x = 0 }` | `如果 (x < 0)` + 换行 + `x = 0` + 换行 + `结束如果` |
| Method parameter order | Always check manual; do not guess parameter order (e.g., 移动读写位置 expects (基准位置, 偏移量), not (偏移量, 基准位置)) |
| Invalid characters | Ensure no stray whitespace or invisible characters in code |

**Rule**: Never use C++/Java single-line brace syntax for Volcano conditional statements. Always use proper multi-line format with `如果`, `否则`, `结束如果`.

### 2. File Operation Errors

| Mistake | Wrong | Correct |
|---------|-------|---------|
| Filename suffix change | `磁盘操作类.改变文件名后缀("锤子.cur", ".cur")` may produce "锤子..cur" | Manually handle filename strings to avoid double dots |
| File position constants | Use integer `0` for file start | Use `文件基准位置.文件首` constant |
| Missing file validation | Assume file exists and is valid | Always check `文件是否存在()` and validate file size/format before operations |

**Rule**: Always use named constants from the `文件基准位置` enum instead of magic numbers (0, 1, 2). Validate file existence before operations.

### 3. Image/CUR/ICO Format Requirements

When working with CUR (cursor) or ICO (icon) files:

| Requirement | Details |
|-------------|---------|
| Double height | DIB header height must be `2 × image_height` (XOR mask + AND mask) |
| AND mask | Must compute and append AND mask data: `每行字节数 = (宽度 + 7) / 8`, aligned to 4-byte boundary |
| XOR mask | Standard bitmap color data precedes the AND mask |

**Rule**: For CUR/ICO files, never treat them as standard BMP. Always calculate AND mask and double the height value in the DIB header.

### 4. Byte Set (字节集) Operations

| Wrong approach | Correct approach |
|----------------|------------------|
| Using non-existent methods like `取字节集中间部分`, `添加字节` | Use `字节集操作` class methods: `取字节集中间()`, `追加字节集()`, `插入字节集()` |
| Assuming methods exist without verification | Check the `字节集操作` class in manual for available methods |

**Rule**: Do not invent byte set method names. Use only methods documented in the `字节集操作` class.

### 5. Environment & Dependencies

| Mistake | Prevention |
|---------|------------|
| Assuming Python is available with specific libraries | Check Python availability and required packages (e.g., Pillow) before generating Python-dependent code; provide fallback pure Volcano solutions |
| Incorrect C++ embedding syntax | When embedding C++ in 火山视窗, verify the exact syntax for `@嵌入式方法` and `@嵌入代码` directives; do not guess |
| Not handling missing dependencies gracefully | Include `取程序错误信息()` or equivalent error reporting; provide clear user guidance |

### 6. Code Structure Problems

| Mistake | Wrong | Correct |
|---------|-------|---------|
| Event handling | `挂接事件(按钮)` | `挂接事件(按钮, 标记值)` - requires two parameters |
| Variable naming | Variables named `宽度`, `高度` conflicting with window class properties | Use distinct names like `图片宽度`, `窗口高度` |
| Error handling | No validation or user feedback | Include `如果 (取反(文件是否存在(路径)))` with descriptive `信息框()` prompts |
| Missing event loop | Code exits before processing events | Ensure `消息循环` or `运行()` is called for GUI applications |

### 7. General Prevention Checklist

Before outputting Volcano code, verify:

- [ ] Conditional statements use multi-line `如果...结束如果` format, not brace syntax
- [ ] Method parameters follow manual order (check against documentation)
- [ ] File operations use named constants (e.g., `文件基准位置.文件首`) not magic numbers
- [ ] Filename operations avoid double dots; prefer string manipulation over `改变文件名后缀` when uncertain
- [ ] CUR/ICO files have double height and AND mask properly implemented
- [ ] Byte set operations use `字节集操作` class documented methods
- [ ] Environment dependencies are checked or pure Volcano alternatives provided
- [ ] Event handling uses correct parameter count (`挂接事件` requires two parameters)
- [ ] Variable names don't conflict with reserved names or window properties
- [ ] Error handling provides user feedback with `信息框()` or `调试输出()`

## Response Rules

- Cite which manual was used when the answer depends on official syntax or API details.
- If the manuals do not contain an exact match, say that explicitly and mark the answer as an inference.
- Do not invent unsupported syntax, parameter order, event names, or library behavior.
- Prefer short runnable examples in Volcano style.
- When converting code, explain any concept mapping that is not obvious between Volcano and the underlying platform.
- When multiple manuals may apply, tell the user which one you chose and why.
- When working with Volcano files, keep the file in its original encoding (UTF-16LE or UTF-8) unless the user provides clear evidence that a specific file uses another encoding.
- When working with `.vprj` or `.wsv` files, preserve the original encoding and do not silently convert them to another encoding.
- **When generating code for 火山视窗**: Review the Common Mistakes section above and ensure none of those patterns appear in the output.
- **When uncertain about parameter order or method existence**: State the uncertainty explicitly and recommend checking the manual.

## Example Requests

- "火山视窗里怎么声明数组并遍历?"
- "把这段 Java 思路改成火山安卓写法"
- "火山服务器怎么发 HTTP 请求?"
- "从官方文档里找一个定时器或线程的示例"
- "这个火山命令是什么意思,给我对应示例"

## Boundaries

- This skill is intended for Windows only.
- This skill depends on local manuals existing under `%USERPROFILE%\.codex\docs`.
- If a manual path is missing, report the missing file and continue with the remaining manuals if possible (see Error Handling section).
- Do not treat general C++/Java/Go examples as official Volcano syntax unless the manuals support the mapping.
- Do not inspect or cite backup project files such as `*.~vbak.vprj` and `*.~vbak.wsv` unless the user explicitly requests those files.
- Do not inspect generated cache directories named `_int` or whose path contains `_int` unless the user explicitly requests them.
```

## 主要修改摘要

| 新增内容 | 说明 |
|----------|------|
| **Common Mistakes & Prevention** 章节 | 基于你提供的错误经验,系统化整理了7类常见错误 |
| 语法错误表格 | 明确条件语句不能用C++大括号格式,必须用多行`如果...结束如果` |
| 文件操作错误表格 | 包含`改变文件名后缀`可能产生双点的问题、`文件基准位置`常量使用 |
| CUR/ICO格式要求 | 明确双倍高度、AND掩码的计算规则 |
| 字节集操作 | 禁止臆造方法名,必须使用`字节集操作`类 |
| 环境依赖 | Python/Pillow检查、C++嵌入语法验证 |
| 代码结构问题 | 事件处理、变量命名、错误处理、消息循环 |
| 预防检查清单 | 输出代码前应验证的10个要点 |
| Response Rules增强 | 新增两条规则:生成代码时检查Common Mistakes;不确定时明确声明 |

这份修改后的 `SKILL.md` 应该能有效防止同类错误再次发生。
作者: wyc00    时间: 2026-4-7 10:52
这是用trae cn编写的程序,已调试通过,注意trae cn编写的窗口组件在窗口中是看不到的,你自己要手动把它弄出来: (, 下载次数: 298) pos=\“0,0,0,0\"”,你把后面两个0,改成数字后就可以在窗口中看到,再人工按排,所有组件都是这样的




作者: wyc00    时间: 2026-4-7 13:10
在火山视窗中,模块文件(.v文件)和脚本文件(.wsv文件)的使用方式如下:

1. 模块文件(.v文件) :
   
   - 这些是预编译的模块,包含类定义、方法和常量
   - 它们已经被编译成火山平台可识别的格式
   - 你可以在wsv文件中直接引用这些模块中的类和方法
2. 脚本文件(.wsv文件) :
   
   - 这是你编写代码的主要文件
   - 你可以直接使用模块中定义的类和方法,无需转换
3. 使用方式 :
   
   - 在wsv文件中,你可以直接使用模块中的类,例如: 变量 图像对象 <类型 = 火山.视窗.图像处理.图像处理类>
   - 模块中的方法也可以直接调用,例如: 图像对象.创建自图像文件 (png路径, 图像格式类型.PNG格式)
4. 注意事项 :
   
   - 某些类可能需要使用完整的命名空间路径,如 火山.视窗.图像处理.图像处理类
   - 确保模块已经正确导入到项目中(从你的项目结构看,模块已经在"模块"目录下)
所以,你不需要将模块文件转换为wsv格式,直接在wsv文件中使用它们即可。
作者: wyc00    时间: 2026-4-8 16:07
修改技能书的另一种方法:可以在TRAE CN使用中进行,让它总结自己使用火山视窗时常犯的错误,再由自己总结成文,形成修改smill.md的意见,在TRAE CN中可以按路径打开技能书,把它的修改意见拷贝到技能书最后面光标处,按Ctrl+S保存即可
作者: 503879304    时间: 2026-4-9 22:55
我现在使用AIvolcanoSkill.zip 文件 直接把Skills文件扔给WorkBuddy  然后在Skills里添加了一个 创建和更新项目日志的 记忆库.md 文件来记录项目制作的经验和知识!现在完美运行!1千多行的代码 报错整改了6 7 次吧!就可以搞定!虽然目前只能傻瓜式的复制代码到main里  但是够用 还不烧钱!再加上现在GLM-5.1 的加入!更好了!:噜阿噜
作者: 大有可为    时间: 2026-4-9 23:02
503879304 发表于 2026-4-9 22:55
我现在使用AIvolcanoSkill.zip 文件 直接把Skills文件扔给WorkBuddy  然后在Skills里添加了一个 创建和更新 ...

你把易错点让ai整理到技能里面去 下次就不会犯了
作者: wyc00    时间: 2026-4-10 10:11
改完语法错误,让它立即改技能书,不拖
作者: 503879304    时间: 2026-4-10 16:58
大有可为 发表于 2026-4-9 23:02
你把易错点让ai整理到技能里面去 下次就不会犯了

C:\Users\tt\Desktop\1775809301726   缺口有点大!file:///C:/Users/tt/Desktop/1775809301726.jpg
作者: wyc00    时间: 2026-4-14 21:53
大有可为 发表于 2026-3-26 09:01
下个更新就能在新建项目的时候选择wsv格式了,目前是手动转换到wsv 添加现有 删除原来的v

这个比较吃模 ...

gpt5.4怎么申请的?




欢迎光临 递归火山软件开发平台 (https://bbs.voldp.com/) Powered by Discuz! X3.4