MCPcopy Index your code
hub / github.com/Louisym/MiniCC / route

Method route

src/QueryEngine.py:8–16  ·  view source on GitHub ↗
(self, prompt: str, limit: int = 5)

Source from the content-addressed store, hash-verified

6
7class QueryEngineRuntime(QueryEnginePort):
8 def route(self, prompt: str, limit: int = 5) -> str:
9 matches = PortRuntime().route_prompt(prompt, limit=limit)
10 lines = ['# Query Engine Route', '', f'Prompt: {prompt}', '']
11 if not matches:
12 lines.append('No mirrored command/tool matches found.')
13 return '\n'.join(lines)
14 lines.append('Matches:')
15 lines.extend(f'- [{match.kind}] {match.name} ({match.score}) — {match.source_hint}' for match in matches)
16 return '\n'.join(lines)
17
18
19__all__ = ['QueryEnginePort', 'QueryEngineRuntime']

Callers

nothing calls this directly

Calls 3

PortRuntimeClass · 0.85
route_promptMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected