(cwd: Path)
| 39 | |
| 40 | |
| 41 | def _make_command_context(cwd: Path) -> CommandContext: |
| 42 | tool_registry = create_default_tool_registry() |
| 43 | engine = QueryEngine( |
| 44 | api_client=FakeApiClient(), |
| 45 | tool_registry=tool_registry, |
| 46 | permission_checker=PermissionChecker(load_settings().permission), |
| 47 | cwd=cwd, |
| 48 | model="claude-test", |
| 49 | system_prompt="system", |
| 50 | ) |
| 51 | engine.load_messages( |
| 52 | [ |
| 53 | ConversationMessage(role="user", content=[TextBlock(text="one")]), |
| 54 | ConversationMessage(role="assistant", content=[TextBlock(text="two")]), |
| 55 | ConversationMessage(role="user", content=[TextBlock(text="three")]), |
| 56 | ] |
| 57 | ) |
| 58 | return CommandContext( |
| 59 | engine=engine, |
| 60 | cwd=str(cwd), |
| 61 | tool_registry=tool_registry, |
| 62 | app_state=AppStateStore( |
| 63 | AppState(model="claude-test", permission_mode="default", theme="default", keybindings={}) |
| 64 | ), |
| 65 | ) |
| 66 | |
| 67 | |
| 68 | def _write_plugin(source_root: Path) -> Path: |
no test coverage detected