You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: restore human format table display for get and list commands (#1101)
## Summary
Fixes broken human format output in `km get` and `km list` commands
caused by #1100, which wrapped ContentDto objects in anonymous types
that broke HumanOutputFormatter's type checking. This PR restores the
table display functionality and improves the human format by:
- Creating a proper `ContentDtoWithNode` wrapper class instead of using
anonymous objects
- Repositioning node field before ID for better visibility
- Simplifying human format output by moving technical details (mimeType,
size, dates) to verbose mode only
**Before:** Human format was broken (displayed as JSON instead of
tables)
**After:** Clean tables showing only essential information: Node, ID,
Content, Title, Description, Tags
## Changes
- **New file:** `src/Core/Storage/Models/ContentDtoWithNode.cs` - Proper
wrapper class for content with node information
- **Modified:** `src/Main/CLI/Commands/GetCommand.cs` - Uses
`ContentDtoWithNode.FromContentDto()` instead of anonymous object
- **Modified:** `src/Main/CLI/Commands/ListCommand.cs` - Uses
`ContentDtoWithNode.FromContentDto()` for list items
- **Modified:** `src/Main/CLI/OutputFormatters/HumanOutputFormatter.cs`
- Added `FormatContentWithNode()` and `FormatContentWithNodeList()`
methods
### Human Format Display
**km get (normal mode):**
- Node
- ID
- Content
- Title (if present)
- Description (if present)
- Tags (if present)
**km get (verbose mode adds):**
- MimeType, Size, ContentCreatedAt, RecordCreatedAt, RecordUpdatedAt,
Metadata
**km list (normal mode):**
| Node | ID | Content Preview |
## Test Plan
- [x] All 301 tests pass, 0 skipped
- [x] Code coverage: 80.14% (exceeds 80% threshold)
- [x] Build: 0 warnings, 0 errors
- [x] Formatting: Clean
- [x] Manual testing: `km get` displays table with node information
- [x] Manual testing: `km list` displays table with node column
- [x] JSON/YAML formats still include all fields including node
## Stats
- **Files changed:** 5
- **Lines added:** 179
- **Lines removed:** 36
- **New classes:** 1 (`ContentDtoWithNode`)
## Breaking Changes
None - this is a bug fix that restores expected functionality and
improves UX
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Both versions exist purely as research projects used to explore new ideas and ga
14
14
15
15
# What’s next
16
16
17
-
An important aspect of KM² is how we are building the next memory prototype. In parallel, our team is developing [Amplifier](https://github.com/microsoft/amplifier/tree/next), a platform for metacognitive AI engineering. We use Amplifier to build Amplifier itself — and in the same way, we are using Amplifier to build the next generation of Kernel Memory.
17
+
An important aspect of KM² is how we are building the next memory prototype. In parallel, our team is developing [Amplifier](https://github.com/microsoft/amplifier), a platform for metacognitive AI engineering. We use Amplifier to build Amplifier itself — and in a similar way, we are using AI and Amplifier concepts to build the next generation of Kernel Memory.
18
18
19
19
KM² will focus on the following areas, which will be documented in more detail when ready:
20
20
- quality of content generated
@@ -76,4 +76,4 @@ gh api repos/:owner/:repo/contributors --paginate --jq '
0 commit comments