(type: string, key: string)
| 3 | import { GlobalStore } from '@/store'; |
| 4 | |
| 5 | export const jumpToInstall = (type: string, key: string) => { |
| 6 | const globalStore = GlobalStore(); |
| 7 | switch (type) { |
| 8 | case 'php': |
| 9 | case 'node': |
| 10 | case 'java': |
| 11 | case 'go': |
| 12 | case 'python': |
| 13 | case 'dotnet': |
| 14 | jumpToPath(router, '/websites/runtimes/' + type); |
| 15 | return true; |
| 16 | } |
| 17 | switch (key) { |
| 18 | case 'openclaw': |
| 19 | jumpToPath(router, '/ai/agents/agent'); |
| 20 | return true; |
| 21 | case 'copaw': |
| 22 | router.push({ |
| 23 | path: '/ai/agents/agent', |
| 24 | query: { |
| 25 | uncached: 'true', |
| 26 | open: 'create', |
| 27 | agentType: 'copaw', |
| 28 | }, |
| 29 | }); |
| 30 | return true; |
| 31 | case 'hermes-agent': |
| 32 | router.push({ |
| 33 | path: '/ai/agents/agent', |
| 34 | query: { |
| 35 | uncached: 'true', |
| 36 | open: 'create', |
| 37 | agentType: 'hermes-agent', |
| 38 | }, |
| 39 | }); |
| 40 | return true; |
| 41 | case 'vllm': |
| 42 | if (globalStore.isProductPro) { |
| 43 | router.push({ |
| 44 | path: '/ai/model/local', |
| 45 | query: { |
| 46 | tab: 'vllm', |
| 47 | uncached: 'true', |
| 48 | open: 'create', |
| 49 | }, |
| 50 | }); |
| 51 | return true; |
| 52 | } |
| 53 | return false; |
| 54 | case 'mysql-cluster': |
| 55 | jumpToPath(router, '/xpack/cluster/mysql'); |
| 56 | return true; |
| 57 | case 'redis-cluster': |
| 58 | jumpToPath(router, '/xpack/cluster/redis'); |
| 59 | return true; |
| 60 | case 'postgresql-cluster': |
| 61 | jumpToPath(router, '/xpack/cluster/postgres'); |
| 62 | return true; |
nothing calls this directly
no test coverage detected