完善folder页面的web接口实现

This commit is contained in:
xintaofei
2026-03-25 15:27:43 +08:00
parent ac09d3db9e
commit 218055ab01
18 changed files with 569 additions and 37 deletions

View File

@@ -11,6 +11,7 @@ import {
} from "react"
import { useTranslations } from "next-intl"
import { subscribe } from "@/lib/platform"
import { randomUUID } from "@/lib/utils"
import { inferLiveToolName } from "@/lib/tool-call-normalization"
import {
acpConnect,
@@ -536,7 +537,7 @@ function connectionsReducer(
const updated = { ...conn, status: action.status }
if (action.status === "prompting") {
updated.liveMessage = {
id: crypto.randomUUID(),
id: randomUUID(),
role: "assistant",
content: [],
startedAt: Date.now(),

View File

@@ -9,6 +9,7 @@ import {
useState,
type ReactNode,
} from "react"
import { randomUUID } from "@/lib/utils"
import {
ExternalLink,
Eye,
@@ -147,7 +148,7 @@ async function saveGenericAccount(
(a) => a.username === creds.username && extractHost(a.server_url) === host
)
if (!isDuplicate) {
const newId = crypto.randomUUID()
const newId = randomUUID()
await saveAccountToken(newId, creds.password)
await updateGitHubAccounts({
accounts: [
@@ -283,7 +284,7 @@ export function GitCredentialProvider({ children }: { children: ReactNode }) {
)
if (!isDuplicate) {
const newAccount = {
id: crypto.randomUUID(),
id: randomUUID(),
server_url: serverUrl,
username: result.username ?? "unknown",
scopes: result.scopes,