Show renders one context's metadata.
(name string)
| 272 | |
| 273 | // Show renders one context's metadata. |
| 274 | func (a *contextPluginAdapter) Show(name string) (string, error) { |
| 275 | mgr := a.manager() |
| 276 | if mgr == nil { |
| 277 | return "", fmt.Errorf("context manager unavailable in this session") |
| 278 | } |
| 279 | fc, err := mgr.GetContextByName(name) |
| 280 | if err != nil { |
| 281 | return "", fmt.Errorf("context %q not found", name) |
| 282 | } |
| 283 | return renderContextInfo(fc, a.attachedIDs()[fc.ID]), nil |
| 284 | } |
| 285 | |
| 286 | // Inspect renders a deeper view: the documents/chunks, and one chunk's content |
| 287 | // when chunk > 0. |