mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
fix: resolve v0.87.0 release build errors
This commit is contained in:
@@ -130,7 +130,7 @@ function extractToolCallPreview(message: Message): string {
|
||||
if (latestToolCall.status === "failed") {
|
||||
return `执行失败:${toolName}`;
|
||||
}
|
||||
if (latestToolCall.status === "streaming") {
|
||||
if (latestToolCall.status === "running") {
|
||||
return `正在执行:${toolName}`;
|
||||
}
|
||||
return `最近执行:${toolName}`;
|
||||
|
||||
@@ -34,14 +34,14 @@ import { useActiveSkill } from "@/components/agent/chat/components/Inputbar/hook
|
||||
import { skillsApi, type Skill } from "@/lib/api/skills";
|
||||
import { useGlobalMediaGenerationDefaults } from "@/hooks/useGlobalMediaGenerationDefaults";
|
||||
import { resolveMediaGenerationPreference } from "@/lib/mediaGeneration";
|
||||
import type { Page } from "@/types/page";
|
||||
import type { Page, PageParams } from "@/types/page";
|
||||
import { SettingsTabs } from "@/types/settings";
|
||||
|
||||
export interface AiImageGenTabProps {
|
||||
/** 目标项目 ID(可选) */
|
||||
projectId?: string | null;
|
||||
/** 导航回调 */
|
||||
onNavigate?: (page: Page) => void;
|
||||
onNavigate?: (page: Page, params?: PageParams) => void;
|
||||
}
|
||||
|
||||
type ResolutionPreset = "1k" | "2k" | "4k";
|
||||
|
||||
@@ -36,7 +36,8 @@ import {
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { useProjects } from "@/hooks/useProjects";
|
||||
import type { ProjectType } from "@/lib/api/project";
|
||||
import { USER_PROJECT_TYPES, getProjectTypeLabel } from "@/lib/api/project";
|
||||
import { USER_PROJECT_TYPES } from "@/lib/api/project";
|
||||
import { WorkspaceTypeLabels } from "@/types/workspace";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { CreateProjectDialog } from "./CreateProjectDialog";
|
||||
import {
|
||||
@@ -328,7 +329,9 @@ export function ProjectSelector({
|
||||
: null;
|
||||
const projectSummaryBadges = [
|
||||
selectedProject?.isDefault ? "默认项目" : "普通项目",
|
||||
selectedProject ? getProjectTypeLabel(selectedProject.workspaceType) : "待选择",
|
||||
selectedProject
|
||||
? WorkspaceTypeLabels[selectedProject.workspaceType]
|
||||
: "待选择",
|
||||
];
|
||||
|
||||
return (
|
||||
@@ -462,7 +465,7 @@ export function ProjectSelector({
|
||||
variant="outline"
|
||||
className="border-slate-200/80 bg-white/80 text-[10px] text-slate-600"
|
||||
>
|
||||
{getProjectTypeLabel(project.workspaceType)}
|
||||
{WorkspaceTypeLabels[project.workspaceType]}
|
||||
</Badge>
|
||||
{project.tags.slice(0, 2).map((tag) => (
|
||||
<Badge
|
||||
|
||||
@@ -10,6 +10,13 @@ import { CharacterPanel } from "./CharacterPanel";
|
||||
import { WorldBuildingPanel } from "./WorldBuildingPanel";
|
||||
import { OutlinePanel } from "./OutlinePanel";
|
||||
|
||||
type OutlineTreeNodeMock = {
|
||||
id?: string;
|
||||
parent_id?: string;
|
||||
children: OutlineTreeNodeMock[];
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
const {
|
||||
mockListCharacters,
|
||||
mockCreateCharacter,
|
||||
@@ -54,10 +61,13 @@ vi.mock("@/lib/api/memory", () => ({
|
||||
deleteOutlineNode: mockDeleteOutlineNode,
|
||||
buildOutlineTree: vi.fn((nodes: Array<Record<string, unknown>>) => {
|
||||
const byId = new Map(
|
||||
nodes.map((node) => [String(node.id), { ...node, children: [] as Array<Record<string, unknown>> }]),
|
||||
nodes.map((node) => [
|
||||
String(node.id),
|
||||
{ ...node, children: [] } as OutlineTreeNodeMock,
|
||||
]),
|
||||
);
|
||||
|
||||
const roots: Array<Record<string, unknown>> = [];
|
||||
const roots: OutlineTreeNodeMock[] = [];
|
||||
byId.forEach((node) => {
|
||||
const parentId =
|
||||
typeof node.parent_id === "string" ? node.parent_id : undefined;
|
||||
|
||||
Reference in New Issue
Block a user