Skip to content

[Feature]: web read / weixin download 执行后明确显示文件保存路径,并完善 skill 文档说明 #1038

@uxfion

Description

@uxfion

Feature Description

opencli web readopencli weixin download 执行成功后,仅在终端打印元数据摘要,没有任何关于文件保存位置的提示:

- title: <page title>
  author: '-'
  status: success
  size: 12.4 KB

希望在输出中明确显示内容保存到了哪个本地路径,并在 skill 文档中补充说明。

Use Case

As an AI agent user, I want to know where the saved file is after running opencli web read, so that I can immediately read the local file instead of mistakenly assuming the command failed to retrieve content.

当前 agent 默认假设命令输出走 stdout,看到终端没有实质内容时,会误判为抓取失败,进而反复重试或放弃,而实际上文件已经保存到了本地。如果输出中包含保存路径,agent 可以直接读取本地文件,避免不必要的重试。

Proposed Solution

1. 在终端输出中补充保存路径

在命令成功后的元数据摘要中新增 saved 字段:

- title: <page title>
  status: success
  size: 12.4 KB
  saved: ./web-articles/<title>/<title>.md

2. 完善 skill 文档说明

SKILL.md 的 adapter 表格中补充说明:

# Before
| **web**    | 🌐 | `read` — any URL to Markdown              |
| **weixin** | 🌐 | `download` — 公众号 article to Markdown   |

# After
| **web**    | 🌐 | `read` — any URL to Markdown ⚠️ 内容保存到本地文件,非 stdout |
| **weixin** | 🌐 | `download` — 公众号 article to Markdown ⚠️ 内容保存到本地文件,非 stdout |

commands.md 的示例注释中补充说明:

# Before
opencli web read --url "https://..."
opencli weixin download --url "https://mp.weixin.qq.com/s/xxx"

# After
opencli web read --url "https://..."      # 保存到 ./web-articles/,非 stdout
opencli weixin download --url "https://mp.weixin.qq.com/s/xxx"  # 保存到 ./web-articles/,非 stdout

Alternatives Considered

将内容改为直接输出到 stdout:对脚本管道友好,但大文章会导致终端输出过多,不适合交互场景。所以在stdout中提到保存路径是最好的解决办法。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions