a2aproject / a2aproject/a2a-cli

feat: implement an option for storing file parts as files

未關閉
#41 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Go
星號
95
分支
4
平均合併
3 天 2 小時
30 天內合併 PR
24

描述

### Which area does this relate to?

- [x] CLI code
- [ ] SPEC or COMPLIANCE file
- [ ] Other doc files

### What kind of feature are you proposing?

New command or flag

### What would you like to see?

Add a flag `--save-fileparts ` or similar that if passed will instruct the CLI to look for filename in response Artifact and Message parts and store them under the provided directory as files.
If a filename doesn't have an extension we can try inferring it from mediaType.

The proposal is to append bytes to a file while they correspond to the same artifact. If the same filename is returned for a different artifact it's likely the agent is regenerating a response, so it's better to save it with (2) / (3) / (n) in the name if a file already exists.

### Why is this important?

Raw bytes printed to the terminal are hard to deal with.

### Who benefits from this feature?

a2a cli users, especially when connecting to media-producing agents.

### Would you be interested in helping build this feature?

Yes — I'd like to implement it

### Additional context

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

貢獻指南

開啟貢獻指南

研究方向

Look for the CLI code that handles Artifact and Message parts, likely in a command or response parsing module. Identify where raw bytes are currently printed to the terminal. The flag should be added to the command structure, and logic to save files with deduplication (e.g., appending (2), (3)) needs to be implemented. Check existing tests for CLI commands to understand the testing pattern.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cli, go
領域
cli
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
活躍
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。