mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 11:41: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;
|
|
}
|