A clipboard image can be read directly and uploaded into a Lark document or cover
Source references: 4When the user mentions a screenshot, a recently copied image, or the clipboard, the workflow directs use of --from-clipboard, which reads the system clipboard and uploads the image. The clipboard may have been replaced by another copy operation, and no preview-before-upload step is specified.
The wrong or sensitive clipboard image could be placed in a shared document or used as its cover, exposing screen content, personal data, token screenshots, or internal material.
The source directs the agent to read and upload clipboard image data when the user explicitly refers to a screenshot, recently copied content, or the clipboard. It is an in-memory upload without an intermediate file to inspect, so a replaced clipboard could put the wrong image into the document. This is not silent or arbitrary collection: the source requires an explicit source choice and confirmation before writing. A user can require preview/confirmation of the current clipboard, recopy the image, and name the target document.
> **最高优先级:用户明确指定了来源,就严格按用户的来。** 下面的启发式只在用户没表态时生效。>> - 用户说"把这张截图插进去"、"用剪切板里的图"、"我刚复制的" → 无条件走 `--from-clipboard`。> - 用户说"用 `~/Downloads/foo.png`"、"插本地这个文件"、给了具体路径 → 无条件走 `--file`。> - 用户两者都没说清 → 按下表的启发式推断。>> 即使推断看起来更"优"(比如用户说了路径但你觉得走剪切板更省事),也**不要自作主张**换来源。要换,先问。Show 3 other places
`--from-clipboard` 走进程内存直传,不产生临时文件;macOS / Windows 内置支持,Linux 需要 `xclip` 或 `wl-paste` 或 `xsel` 任一。# 使用本地文件更新封面图。lark-cli docs +resource-update --doc doxcnXXX --type cover --file ./cover.png# 使用剪切板图片更新封面图。lark-cli docs +resource-update --doc doxcnXXX --type cover --from-clipboard> [!CAUTION]> 这是**写入操作**(会修改文档内容)—— 执行前必须确认用户意图。