feat: inject global rules into AI system prompt and fix Rules UI seeding

- Load global rules (AIFact/AIMemory) from local CloudModel and inject
  them into the Bedrock/OpenAI system prompt as a '## Global Rules' section
  when memory is enabled.
- Fix rule seeding: always re-seed predefined rules when the CloudModel has
  none, regardless of the has_seeded_predefined_rules flag (handles case
  where flag was set but rules never persisted due to prior missing owner).
- Rename /context slash command to /copy-context: dumps the full context
  window (global rules, progressive summary, message history) to the
  clipboard for debugging.
This commit is contained in:
Ryan Ward
2026-07-16 12:25:56 -05:00
parent 66ef451115
commit 3d2d90fd4e
10 changed files with 188 additions and 15 deletions
@@ -503,8 +503,8 @@ pub const COST: StaticCommand = StaticCommand {
};
pub const CONTEXT: StaticCommand = StaticCommand {
name: "/context",
description: "Show current context window contents (debug)",
name: "/copy-context",
description: "Copy the full context window to clipboard (debug)",
icon_path: "bundled/svg/bar-chart-04.svg",
availability: Availability::AGENT_VIEW.union(Availability::AI_ENABLED),
auto_enter_ai_mode: false,