@cortexkit/opencode-magic-context 0.21.4 → 0.21.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/agents/permissions.d.ts +142 -0
  3. package/dist/agents/permissions.d.ts.map +1 -0
  4. package/dist/config/index.d.ts.map +1 -1
  5. package/dist/config/schema/agent-overrides.d.ts +12 -12
  6. package/dist/config/schema/magic-context.d.ts +87 -87
  7. package/dist/config/variable.d.ts +9 -7
  8. package/dist/config/variable.d.ts.map +1 -1
  9. package/dist/features/magic-context/key-files/project-key-files.d.ts.map +1 -1
  10. package/dist/features/magic-context/migrations.d.ts +18 -0
  11. package/dist/features/magic-context/migrations.d.ts.map +1 -1
  12. package/dist/features/magic-context/storage-db.d.ts.map +1 -1
  13. package/dist/features/magic-context/storage-meta-persisted.d.ts +17 -0
  14. package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
  15. package/dist/features/magic-context/storage-meta.d.ts +1 -1
  16. package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
  17. package/dist/features/magic-context/storage-notes.d.ts +6 -2
  18. package/dist/features/magic-context/storage-notes.d.ts.map +1 -1
  19. package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
  20. package/dist/features/magic-context/storage.d.ts +1 -1
  21. package/dist/features/magic-context/storage.d.ts.map +1 -1
  22. package/dist/hooks/magic-context/compartment-trigger.d.ts +2 -2
  23. package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
  24. package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +186 -60
  27. package/dist/plugin/rpc-handlers.d.ts +1 -1
  28. package/dist/plugin/rpc-handlers.d.ts.map +1 -1
  29. package/dist/shared/jsonc-parser.d.ts +1 -0
  30. package/dist/shared/jsonc-parser.d.ts.map +1 -1
  31. package/dist/shared/rpc-types.d.ts +10 -0
  32. package/dist/shared/rpc-types.d.ts.map +1 -1
  33. package/dist/tools/ctx-note/tools.d.ts.map +1 -1
  34. package/dist/tui/data/context-db.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/src/shared/jsonc-parser.ts +1 -1
  37. package/src/shared/rpc-types.ts +10 -0
  38. package/src/tui/data/context-db.ts +1 -0
  39. package/src/tui/index.tsx +8 -3
  40. package/src/tui/slots/sidebar-content.tsx +14 -2
@@ -363,9 +363,21 @@ const SidebarContent = (props: {
363
363
  {s() && s()!.inputTokens > 0 && (
364
364
  <box marginTop={1} flexDirection="column">
365
365
  {(s()?.contextLimit ?? 0) > 0 && (
366
- <box width="100%" flexDirection="row" justifyContent="flex-end">
366
+ <box width="100%" flexDirection="row" justifyContent="space-between">
367
+ {/* Left: current usage vs the per-model execute
368
+ threshold (the value Magic Context compares
369
+ against when scheduling historian / drops).
370
+ "47.5% / 65%" tells the user how close they
371
+ are to the next compaction trigger. */}
367
372
  <text fg={contextSummaryColor()}>
368
- <b>{s()!.usagePercentage.toFixed(1)}%</b> · {compactTokens(s()!.inputTokens)} / {compactTokens(s()!.contextLimit)}
373
+ <b>{s()!.usagePercentage.toFixed(1)}%</b> / {s()!.executeThreshold}%
374
+ </text>
375
+ {/* Right: absolute token usage vs the model's
376
+ full context window (separate from the
377
+ execute threshold so users still know how
378
+ much headroom remains beyond compaction). */}
379
+ <text fg={contextSummaryColor()}>
380
+ {compactTokens(s()!.inputTokens)} / {compactTokens(s()!.contextLimit)}
369
381
  </text>
370
382
  </box>
371
383
  )}