fix: complete HoloLake Agent and Forgejo desktop runtime
This commit is contained in:
parent
28f68fa9ac
commit
46bdd0ca73
15 changed files with 1217 additions and 638 deletions
|
|
@ -3,7 +3,9 @@
|
|||
* Agent 和前端 UI 共用同一套接口。
|
||||
*/
|
||||
|
||||
const BASE = '/api';
|
||||
const BASE = typeof window !== 'undefined' && window.location.protocol === 'file:'
|
||||
? 'http://127.0.0.1:3890/api'
|
||||
: '/api';
|
||||
|
||||
async function request<T>(path: string, options?: RequestInit): Promise<T> {
|
||||
const res = await fetch(`${BASE}${path}`, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue