fix: include original file name in compact message output#64
Conversation
84e697e to
08980f5
Compare
|
This is a nice improvement. Adding a human-meaningful file label next to One small request before merging: could we make Could you also add a small test for the serialized output and update the README / skill docs to mention the new field? Since this changes the public JSON shape, it would be good to land the behavior, tests, and docs together. If you make those changes, I’m happy to land this. |
Address reviewer feedback on stablyai#64: - Map name to f.name only, not f.name || f.title - Add test/message-compact.test.ts covering serialized output - Document file fields in skills/agent-slack/references/output.md Co-Authored-By: Claude <noreply@anthropic.com>
08980f5 to
c25d98b
Compare
|
Thanks for the review! Addressed all three points:
Also rebased onto current |
c25d98b to
f810bc6
Compare
- Add `name` field to `CompactSlackMessage.files`, sourced from `f.name` - Add test/message-compact.test.ts with 3 test cases - Document file fields in skills/agent-slack/references/output.md Co-Authored-By: Claude <noreply@anthropic.com>
f810bc6 to
592d5b5
Compare
AmethystLiang
left a comment
There was a problem hiding this comment.
Reviewed the follow-up. README and skill docs now match the new files[].name output, and the new test helper typechecks.
Summary
CompactSlackMessage.filesonly includedmimetype,mode, andpath— the human-readable filename from Slack was dropped during compactionF08ABCD1234.pdf) instead of the original name (e.g.Q4 Report.pdf)namefield to the compact file output, sourced fromSlackFileSummary.nameBefore:
{ "mimetype": "application/pdf", "mode": "hosted", "path": "/tmp/downloads/F08ABCD1234.pdf" }After:
{ "name": "Q4 Report.pdf", "mimetype": "application/pdf", "mode": "hosted", "path": "/tmp/downloads/F08ABCD1234.pdf" }Changes
namemaps tof.nameonly (notf.title) — keeps the field narrowly defined as the actual filenametest/message-compact.test.tswith 3 test cases for serialized outputskills/agent-slack/references/output.mdTest plan
bun test— 129 tests pass (includes new message-compact tests)bun run lint— cleanbun run format:check— cleanbun run dev -- message get <url>thatnamefield appears with the original Slack filename🤖 Generated with Claude Code