mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-11 22:16:08 +00:00
13 lines
306 B
TypeScript
13 lines
306 B
TypeScript
import { routedCommands, type RouteSpec } from "./route-specs.js";
|
|
|
|
export type { RouteSpec } from "./route-specs.js";
|
|
|
|
export function findRoutedCommand(path: string[]): RouteSpec | null {
|
|
for (const route of routedCommands) {
|
|
if (route.match(path)) {
|
|
return route;
|
|
}
|
|
}
|
|
return null;
|
|
}
|