@blade-hq/agent-kit 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -2
- package/dist/chunk-6KO3AOJ7.js +251 -0
- package/dist/chunk-6KO3AOJ7.js.map +1 -0
- package/dist/{chunk-FK4CV6R2.js → chunk-C63X3RCM.js} +629 -32
- package/dist/chunk-C63X3RCM.js.map +1 -0
- package/dist/{chunk-IGMLETZX.js → chunk-DOBX7XP3.js} +15 -12
- package/dist/chunk-DOBX7XP3.js.map +1 -0
- package/dist/{chunk-EGGBOVVF.js → chunk-IP7EZVT5.js} +2 -2
- package/dist/{chunk-OICNN4K4.js → chunk-J6H4TMTH.js} +2 -2
- package/dist/{chunk-F4Y7SUBC.js → chunk-SEHOWQVO.js} +2 -2
- package/dist/{chunk-IDVNG3YJ.js → chunk-YJSN44Q4.js} +16 -3
- package/dist/{chunk-IDVNG3YJ.js.map → chunk-YJSN44Q4.js.map} +1 -1
- package/dist/{chunk-E7FQV4IX.js → chunk-ZPPYDQPU.js} +3 -3
- package/dist/client/auth.d.ts +55 -0
- package/dist/client/blade-client.d.ts +19 -3
- package/dist/client/connection.d.ts +41 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +11 -3
- package/dist/client/resources/auth.d.ts +1 -26
- package/dist/client/socket.d.ts +1 -0
- package/dist/client/types/rest.d.ts +246 -17
- package/dist/client/types/socket-events.d.ts +4 -0
- package/dist/react/api/model-config.d.ts +14 -2
- package/dist/react/api/published-apps.js +3 -3
- package/dist/react/api/sessions.js +2 -2
- package/dist/react/bootstrap.d.ts +1 -1
- package/dist/react/components/chat/index.js +5 -5
- package/dist/react/components/connection/BladeConnectionButton.d.ts +7 -0
- package/dist/react/components/connection/BladeConnectionPanel.d.ts +7 -0
- package/dist/react/components/connection/index.d.ts +2 -0
- package/dist/react/components/connection/index.js +15 -0
- package/dist/react/components/connection/index.js.map +1 -0
- package/dist/react/components/plan/index.js +4 -4
- package/dist/react/components/session/index.js +3 -3
- package/dist/react/components/workspace/index.js +3 -3
- package/dist/react/hooks/use-blade-connection.d.ts +14 -0
- package/dist/react/index.d.ts +6 -2
- package/dist/react/index.js +33 -28
- package/dist/react/index.js.map +1 -1
- package/dist/react/sockets/event-bridge.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +5 -1
- package/dist/chunk-FK4CV6R2.js.map +0 -1
- package/dist/chunk-IGMLETZX.js.map +0 -1
- /package/dist/{chunk-EGGBOVVF.js.map → chunk-IP7EZVT5.js.map} +0 -0
- /package/dist/{chunk-OICNN4K4.js.map → chunk-J6H4TMTH.js.map} +0 -0
- /package/dist/{chunk-F4Y7SUBC.js.map → chunk-SEHOWQVO.js.map} +0 -0
- /package/dist/{chunk-E7FQV4IX.js.map → chunk-ZPPYDQPU.js.map} +0 -0
|
@@ -1,34 +1,45 @@
|
|
|
1
1
|
export type ThinkingRequestFormat = "auto" | "none" | "openai_reasoning_effort" | "openrouter_reasoning" | "deepseek_thinking" | "together_reasoning" | "zai_thinking" | "qwen_enable_thinking" | "sglang_chat_template";
|
|
2
|
+
export type ModelAuthMode = "current_user" | "fixed_key" | "none";
|
|
2
3
|
export interface RuntimeModelService {
|
|
3
4
|
name: string;
|
|
4
5
|
base_url: string;
|
|
5
6
|
api_key_configured: boolean;
|
|
6
7
|
thinking_request_format: ThinkingRequestFormat;
|
|
7
8
|
effective_thinking_request_format: Exclude<ThinkingRequestFormat, "auto">;
|
|
9
|
+
auth_mode: ModelAuthMode;
|
|
8
10
|
}
|
|
9
11
|
export interface RuntimeModelDetails {
|
|
10
12
|
id: string;
|
|
13
|
+
label: string;
|
|
11
14
|
context_window: number;
|
|
12
15
|
supports_vision: boolean;
|
|
13
16
|
}
|
|
14
17
|
export interface RuntimeModelConfig {
|
|
15
18
|
id: string;
|
|
16
19
|
model: RuntimeModelDetails;
|
|
20
|
+
source: "gateway" | "admin";
|
|
21
|
+
overridden: boolean;
|
|
17
22
|
}
|
|
18
23
|
export interface RuntimeModelConfigCollection {
|
|
19
24
|
service: RuntimeModelService;
|
|
20
25
|
items: RuntimeModelConfig[];
|
|
21
|
-
|
|
26
|
+
default_model_id: string;
|
|
27
|
+
default_source: "admin" | "startup" | "gateway" | "none";
|
|
28
|
+
admin_default_model_id: string | null;
|
|
29
|
+
admin_default_available: boolean;
|
|
22
30
|
source: "saved" | "startup";
|
|
31
|
+
catalog_incomplete: boolean;
|
|
32
|
+
catalog_stale: boolean;
|
|
23
33
|
}
|
|
24
34
|
export interface UpdateRuntimeModelService {
|
|
25
35
|
base_url: string;
|
|
26
36
|
api_key?: string;
|
|
27
37
|
thinking_request_format: ThinkingRequestFormat;
|
|
38
|
+
auth_mode: ModelAuthMode;
|
|
28
39
|
}
|
|
29
40
|
export interface UpdateModelDetails {
|
|
30
41
|
id: string;
|
|
31
|
-
context_window: number;
|
|
42
|
+
context_window: number | null;
|
|
32
43
|
supports_vision: boolean;
|
|
33
44
|
}
|
|
34
45
|
export interface UpdateRuntimeModelConfig {
|
|
@@ -60,6 +71,7 @@ export declare function createRuntimeModelConfig(config: UpdateRuntimeModelConfi
|
|
|
60
71
|
export declare function updateRuntimeModelConfig(configId: string, config: UpdateRuntimeModelConfig): Promise<RuntimeModelConfigCollection>;
|
|
61
72
|
export declare function deleteRuntimeModelConfig(configId: string): Promise<RuntimeModelConfigCollection>;
|
|
62
73
|
export declare function setDefaultRuntimeModelConfig(configId: string): Promise<RuntimeModelConfigCollection>;
|
|
74
|
+
export declare function clearDefaultRuntimeModelConfig(): Promise<RuntimeModelConfigCollection>;
|
|
63
75
|
export declare function detectContextWindow(config: ModelConfigProbe): Promise<ContextWindowDetectionResult>;
|
|
64
76
|
export declare function listModelCandidates(config: ModelCandidatesRequest): Promise<ModelCandidatesResult>;
|
|
65
77
|
export declare function testRuntimeModelConfig(config: ModelConfigProbe): Promise<ModelConfigTestResult>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listPublishedApps,
|
|
3
3
|
unpublishApp
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-IP7EZVT5.js";
|
|
5
|
+
import "../../chunk-YJSN44Q4.js";
|
|
6
6
|
import "../../chunk-J3XVFPOV.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-C63X3RCM.js";
|
|
8
8
|
import "../../chunk-JCJFFJ42.js";
|
|
9
9
|
import "../../chunk-PZ5AY32C.js";
|
|
10
10
|
export {
|
|
@@ -41,9 +41,9 @@ import {
|
|
|
41
41
|
updateSharing,
|
|
42
42
|
uploadFiles,
|
|
43
43
|
writeFile
|
|
44
|
-
} from "../../chunk-
|
|
44
|
+
} from "../../chunk-YJSN44Q4.js";
|
|
45
45
|
import "../../chunk-J3XVFPOV.js";
|
|
46
|
-
import "../../chunk-
|
|
46
|
+
import "../../chunk-C63X3RCM.js";
|
|
47
47
|
import "../../chunk-JCJFFJ42.js";
|
|
48
48
|
import "../../chunk-PZ5AY32C.js";
|
|
49
49
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BladeClient, type BladeClientOptions } from "../client/index.js";
|
|
2
2
|
export declare function attachClientToStores(client: BladeClient): void;
|
|
3
|
-
export declare function bootstrapBladeClient(options
|
|
3
|
+
export declare function bootstrapBladeClient(options?: BladeClientOptions): BladeClient;
|
|
4
4
|
export declare function getBootstrappedClient(): BladeClient;
|
|
@@ -18,16 +18,16 @@ import {
|
|
|
18
18
|
isErrorMessage,
|
|
19
19
|
isUserMessage,
|
|
20
20
|
useWhatIfQuoteContext
|
|
21
|
-
} from "../../../chunk-
|
|
21
|
+
} from "../../../chunk-DOBX7XP3.js";
|
|
22
22
|
import "../../../chunk-H62LH2AG.js";
|
|
23
23
|
import {
|
|
24
24
|
AskUserQuestionBlock
|
|
25
|
-
} from "../../../chunk-
|
|
26
|
-
import "../../../chunk-
|
|
25
|
+
} from "../../../chunk-ZPPYDQPU.js";
|
|
26
|
+
import "../../../chunk-J6H4TMTH.js";
|
|
27
27
|
import "../../../chunk-2UP7MG3J.js";
|
|
28
|
-
import "../../../chunk-
|
|
28
|
+
import "../../../chunk-YJSN44Q4.js";
|
|
29
29
|
import "../../../chunk-J3XVFPOV.js";
|
|
30
|
-
import "../../../chunk-
|
|
30
|
+
import "../../../chunk-C63X3RCM.js";
|
|
31
31
|
import "../../../chunk-7LEKQI47.js";
|
|
32
32
|
import "../../../chunk-JCJFFJ42.js";
|
|
33
33
|
import "../../../chunk-PZ5AY32C.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BladeAuthenticatedUser, BladeConnectionError } from "../../../client/index.js";
|
|
2
|
+
export interface BladeConnectionButtonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
onConnected?: (user: BladeAuthenticatedUser) => void;
|
|
5
|
+
onError?: (error: BladeConnectionError) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function BladeConnectionButton({ className, onConnected, onError, }: BladeConnectionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BladeAuthenticatedUser, BladeConnectionError } from "../../../client/index.js";
|
|
2
|
+
export interface BladeConnectionPanelProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
onConnected?: (user: BladeAuthenticatedUser) => void;
|
|
5
|
+
onError?: (error: BladeConnectionError) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function BladeConnectionPanel({ className, onConnected, onError, }: BladeConnectionPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BladeConnectionButton,
|
|
3
|
+
BladeConnectionPanel
|
|
4
|
+
} from "../../../chunk-6KO3AOJ7.js";
|
|
5
|
+
import "../../../chunk-YJSN44Q4.js";
|
|
6
|
+
import "../../../chunk-J3XVFPOV.js";
|
|
7
|
+
import "../../../chunk-C63X3RCM.js";
|
|
8
|
+
import "../../../chunk-7LEKQI47.js";
|
|
9
|
+
import "../../../chunk-JCJFFJ42.js";
|
|
10
|
+
import "../../../chunk-PZ5AY32C.js";
|
|
11
|
+
export {
|
|
12
|
+
BladeConnectionButton,
|
|
13
|
+
BladeConnectionPanel
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
PlanSummaryCard,
|
|
4
4
|
extractLatestPlanMessages,
|
|
5
5
|
parsePlanMessages
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
6
|
+
} from "../../../chunk-ZPPYDQPU.js";
|
|
7
|
+
import "../../../chunk-J6H4TMTH.js";
|
|
8
8
|
import "../../../chunk-2UP7MG3J.js";
|
|
9
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-YJSN44Q4.js";
|
|
10
10
|
import "../../../chunk-J3XVFPOV.js";
|
|
11
|
-
import "../../../chunk-
|
|
11
|
+
import "../../../chunk-C63X3RCM.js";
|
|
12
12
|
import {
|
|
13
13
|
cn
|
|
14
14
|
} from "../../../chunk-7LEKQI47.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useSession
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-SEHOWQVO.js";
|
|
4
4
|
import {
|
|
5
5
|
checkoutSession,
|
|
6
6
|
getSessionCheckpoints,
|
|
7
7
|
useChatStore,
|
|
8
8
|
useSessionStore
|
|
9
|
-
} from "../../../chunk-
|
|
9
|
+
} from "../../../chunk-YJSN44Q4.js";
|
|
10
10
|
import "../../../chunk-J3XVFPOV.js";
|
|
11
|
-
import "../../../chunk-
|
|
11
|
+
import "../../../chunk-C63X3RCM.js";
|
|
12
12
|
import {
|
|
13
13
|
cn
|
|
14
14
|
} from "../../../chunk-7LEKQI47.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "../../../chunk-H62LH2AG.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveSessionFilePreviewTarget
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-J6H4TMTH.js";
|
|
9
9
|
import {
|
|
10
10
|
apiFetchText,
|
|
11
11
|
copyFile,
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
useChatStore,
|
|
20
20
|
useSessionStore,
|
|
21
21
|
useUiStore
|
|
22
|
-
} from "../../../chunk-
|
|
22
|
+
} from "../../../chunk-YJSN44Q4.js";
|
|
23
23
|
import "../../../chunk-J3XVFPOV.js";
|
|
24
|
-
import "../../../chunk-
|
|
24
|
+
import "../../../chunk-C63X3RCM.js";
|
|
25
25
|
import {
|
|
26
26
|
cn
|
|
27
27
|
} from "../../../chunk-7LEKQI47.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BladePopupOptions } from "../../client/index.js";
|
|
2
|
+
export declare function useBladeConnection(): {
|
|
3
|
+
status: import("../../client/index.js").BladeConnectionStatus;
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
user: import("../../client/index.js").BladeAuthenticatedUser | null;
|
|
6
|
+
error: import("../../client/index.js").BladeConnectionError | null;
|
|
7
|
+
persistent: boolean;
|
|
8
|
+
managedBySdk: boolean;
|
|
9
|
+
connect: (options?: BladePopupOptions) => Promise<import("../../client/index.js").BladeAuthenticatedUser>;
|
|
10
|
+
disconnect: () => Promise<void>;
|
|
11
|
+
retry: () => Promise<import("../../client/index.js").BladeConnectionSnapshot>;
|
|
12
|
+
setBaseUrl: (baseUrl: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export type UseBladeConnectionResult = ReturnType<typeof useBladeConnection>;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ export { attachClientToStores, bootstrapBladeClient, getBootstrappedClient } fro
|
|
|
2
2
|
export { BladeContext } from "./context.js";
|
|
3
3
|
export { BladeClientProvider, useBladeClient } from "./provider.js";
|
|
4
4
|
export type { BladeClientProviderProps } from "./provider.js";
|
|
5
|
+
export { useBladeConnection } from "./hooks/use-blade-connection.js";
|
|
6
|
+
export type { UseBladeConnectionResult } from "./hooks/use-blade-connection.js";
|
|
7
|
+
export { BladeConnectionButton, BladeConnectionPanel, } from "./components/connection/index.js";
|
|
8
|
+
export type { BladeConnectionButtonProps, BladeConnectionPanelProps, } from "./components/connection/index.js";
|
|
5
9
|
export * as apiKeysApi from "./api/api-keys.js";
|
|
6
10
|
export * as appDevTemplatesApi from "./api/app-dev-templates.js";
|
|
7
11
|
export type { ApiKeyCreateResponse, ApiKeyPublic } from "./api/api-keys.js";
|
|
@@ -14,7 +18,7 @@ export * as memoriesApi from "./api/memories.js";
|
|
|
14
18
|
export * as gisApi from "./api/gis-api.js";
|
|
15
19
|
export * as modelsApi from "./api/models.js";
|
|
16
20
|
export * as modelConfigApi from "./api/model-config.js";
|
|
17
|
-
export type { ContextWindowDetectionResult, ModelCandidatesRequest, ModelCandidatesResult, ModelConfigProbe, ModelConfigTestResult, RuntimeModelConfig, RuntimeModelConfigCollection, RuntimeModelDetails, RuntimeModelService, ThinkingRequestFormat, UpdateModelDetails, UpdateRuntimeModelService, UpdateRuntimeModelConfig, } from "./api/model-config.js";
|
|
21
|
+
export type { ContextWindowDetectionResult, ModelCandidatesRequest, ModelCandidatesResult, ModelConfigProbe, ModelConfigTestResult, ModelAuthMode, RuntimeModelConfig, RuntimeModelConfigCollection, RuntimeModelDetails, RuntimeModelService, ThinkingRequestFormat, UpdateModelDetails, UpdateRuntimeModelService, UpdateRuntimeModelConfig, } from "./api/model-config.js";
|
|
18
22
|
export type { Memory, MemoryCreateBody, MemoryListParams, MemoryListResponse, } from "./api/memories.js";
|
|
19
23
|
export * as partnerSkillApi from "./api/partner-skill.js";
|
|
20
24
|
export * as publishedAppsApi from "./api/published-apps.js";
|
|
@@ -60,7 +64,7 @@ export { locateHtmlElementSource } from "./lib/html-source-locator.js";
|
|
|
60
64
|
export type { HtmlSourceLocation, HtmlSourceLocatorElement } from "./lib/html-source-locator.js";
|
|
61
65
|
export { buildHtmlElementSelectionContext } from "./lib/html-element-selection.js";
|
|
62
66
|
export type { BuildHtmlElementSelectionInput, HtmlElementSelectionContext, HtmlElementSelectionRaw, PendingHtmlElementContext, } from "./lib/html-element-selection.js";
|
|
63
|
-
export { buildMessageContent, getTextContent, groupMessagesByLoop, transformSlashCommand, } from "./lib/chat.js";
|
|
67
|
+
export { buildMessageContent, getTextContent, groupMessagesByLoop, isHiddenInternalMessage, transformSlashCommand, } from "./lib/chat.js";
|
|
64
68
|
export { ATTACHMENT_SIZE_LIMIT_BYTES, formatFileSize, splitFilesBySize, } from "./lib/attachment-upload.js";
|
|
65
69
|
export type { OversizedFileInfo } from "./lib/attachment-upload.js";
|
|
66
70
|
export { getCodeLanguageFromFilename, normalizeCodeLanguage, useHighlightedCodeHtml, } from "./lib/code-highlight.js";
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BladeClientProvider,
|
|
3
|
+
BladeConnectionButton,
|
|
4
|
+
BladeConnectionPanel,
|
|
5
|
+
BladeContext,
|
|
6
|
+
useBladeClient,
|
|
7
|
+
useBladeConnection
|
|
8
|
+
} from "../chunk-6KO3AOJ7.js";
|
|
1
9
|
import {
|
|
2
10
|
published_apps_exports
|
|
3
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-IP7EZVT5.js";
|
|
4
12
|
import {
|
|
5
13
|
useCardState
|
|
6
14
|
} from "../chunk-DQCXSPHP.js";
|
|
@@ -36,7 +44,7 @@ import {
|
|
|
36
44
|
useTiptapVoiceInput,
|
|
37
45
|
useVoiceInput,
|
|
38
46
|
user_preferences_exports
|
|
39
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-DOBX7XP3.js";
|
|
40
48
|
import "../chunk-H62LH2AG.js";
|
|
41
49
|
import {
|
|
42
50
|
CardCodeBlock,
|
|
@@ -46,21 +54,21 @@ import {
|
|
|
46
54
|
normalizeCodeLanguage,
|
|
47
55
|
useCardContext,
|
|
48
56
|
useHighlightedCodeHtml
|
|
49
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-ZPPYDQPU.js";
|
|
50
58
|
import {
|
|
51
59
|
buildBinaryPreviewTarget,
|
|
52
60
|
buildSessionBinaryPreviewTarget,
|
|
53
61
|
isOfficePdfPreviewable,
|
|
54
62
|
resolveSessionFilePreviewTarget,
|
|
55
63
|
resolveTextPreviewType
|
|
56
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-J6H4TMTH.js";
|
|
57
65
|
import {
|
|
58
66
|
CardJSON,
|
|
59
67
|
cardRegistry
|
|
60
68
|
} from "../chunk-2UP7MG3J.js";
|
|
61
69
|
import {
|
|
62
70
|
useSession
|
|
63
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-SEHOWQVO.js";
|
|
64
72
|
import {
|
|
65
73
|
PartnerSkillFile,
|
|
66
74
|
PartnerSkillInstallPayload,
|
|
@@ -89,6 +97,7 @@ import {
|
|
|
89
97
|
getTextContent,
|
|
90
98
|
groupMessagesByLoop,
|
|
91
99
|
invalidateHomeSidebarSessions,
|
|
100
|
+
isHiddenInternalMessage,
|
|
92
101
|
isInsideIframe,
|
|
93
102
|
isUiMeta,
|
|
94
103
|
listSkills,
|
|
@@ -115,12 +124,12 @@ import {
|
|
|
115
124
|
useTaskStore,
|
|
116
125
|
useUiBridgeStore,
|
|
117
126
|
useUiStore
|
|
118
|
-
} from "../chunk-
|
|
127
|
+
} from "../chunk-YJSN44Q4.js";
|
|
119
128
|
import "../chunk-J3XVFPOV.js";
|
|
120
129
|
import {
|
|
121
130
|
REGISTRY_PREFIX,
|
|
122
131
|
normalizeResource
|
|
123
|
-
} from "../chunk-
|
|
132
|
+
} from "../chunk-C63X3RCM.js";
|
|
124
133
|
import {
|
|
125
134
|
cn,
|
|
126
135
|
copyToClipboard
|
|
@@ -132,21 +141,6 @@ import {
|
|
|
132
141
|
__export
|
|
133
142
|
} from "../chunk-PZ5AY32C.js";
|
|
134
143
|
|
|
135
|
-
// src/react/context.ts
|
|
136
|
-
import { createContext } from "react";
|
|
137
|
-
var BladeContext = createContext(null);
|
|
138
|
-
|
|
139
|
-
// src/react/provider.tsx
|
|
140
|
-
import { useContext } from "react";
|
|
141
|
-
import { jsx } from "react/jsx-runtime";
|
|
142
|
-
function BladeClientProvider({ client, children }) {
|
|
143
|
-
const instance = client ?? getBootstrappedClient();
|
|
144
|
-
return /* @__PURE__ */ jsx(BladeContext.Provider, { value: instance, children });
|
|
145
|
-
}
|
|
146
|
-
function useBladeClient() {
|
|
147
|
-
return useContext(BladeContext) ?? getBootstrappedClient();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
144
|
// src/react/api/api-keys.ts
|
|
151
145
|
var api_keys_exports = {};
|
|
152
146
|
__export(api_keys_exports, {
|
|
@@ -228,6 +222,7 @@ var fetchRuntimeConfig = (...args) => r4().fetchRuntimeConfig(...args);
|
|
|
228
222
|
// src/react/api/model-config.ts
|
|
229
223
|
var model_config_exports = {};
|
|
230
224
|
__export(model_config_exports, {
|
|
225
|
+
clearDefaultRuntimeModelConfig: () => clearDefaultRuntimeModelConfig,
|
|
231
226
|
createRuntimeModelConfig: () => createRuntimeModelConfig,
|
|
232
227
|
deleteRuntimeModelConfig: () => deleteRuntimeModelConfig,
|
|
233
228
|
detectContextWindow: () => detectContextWindow,
|
|
@@ -257,7 +252,7 @@ function createRuntimeModelConfig(config) {
|
|
|
257
252
|
}
|
|
258
253
|
function updateRuntimeModelConfig(configId, config) {
|
|
259
254
|
return apiFetch(
|
|
260
|
-
`/api/admin/model-config/${encodeURIComponent(configId)}`,
|
|
255
|
+
`/api/admin/model-config/models/${encodeURIComponent(configId)}`,
|
|
261
256
|
{
|
|
262
257
|
method: "PUT",
|
|
263
258
|
headers: { "Content-Type": "application/json" },
|
|
@@ -267,15 +262,21 @@ function updateRuntimeModelConfig(configId, config) {
|
|
|
267
262
|
}
|
|
268
263
|
function deleteRuntimeModelConfig(configId) {
|
|
269
264
|
return apiFetch(
|
|
270
|
-
`/api/admin/model-config/${encodeURIComponent(configId)}`,
|
|
265
|
+
`/api/admin/model-config/models/${encodeURIComponent(configId)}`,
|
|
271
266
|
{ method: "DELETE" }
|
|
272
267
|
);
|
|
273
268
|
}
|
|
274
269
|
function setDefaultRuntimeModelConfig(configId) {
|
|
275
|
-
return apiFetch(
|
|
276
|
-
|
|
277
|
-
{
|
|
278
|
-
|
|
270
|
+
return apiFetch("/api/admin/model-config/default", {
|
|
271
|
+
method: "PUT",
|
|
272
|
+
headers: { "Content-Type": "application/json" },
|
|
273
|
+
body: JSON.stringify({ model_id: configId })
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function clearDefaultRuntimeModelConfig() {
|
|
277
|
+
return apiFetch("/api/admin/model-config/default/reset", {
|
|
278
|
+
method: "PUT"
|
|
279
|
+
});
|
|
279
280
|
}
|
|
280
281
|
function detectContextWindow(config) {
|
|
281
282
|
return apiFetch("/api/admin/model-config/detect-context-window", {
|
|
@@ -1875,6 +1876,8 @@ export {
|
|
|
1875
1876
|
AgentDriver,
|
|
1876
1877
|
AgentResource,
|
|
1877
1878
|
BladeClientProvider,
|
|
1879
|
+
BladeConnectionButton,
|
|
1880
|
+
BladeConnectionPanel,
|
|
1878
1881
|
BladeContext,
|
|
1879
1882
|
CardCodeBlock,
|
|
1880
1883
|
CardContext,
|
|
@@ -1960,6 +1963,7 @@ export {
|
|
|
1960
1963
|
gis_api_exports as gisApi,
|
|
1961
1964
|
groupMessagesByLoop,
|
|
1962
1965
|
invalidateHomeSidebarSessions,
|
|
1966
|
+
isHiddenInternalMessage,
|
|
1963
1967
|
isInsideIframe,
|
|
1964
1968
|
isOfficePdfPreviewable,
|
|
1965
1969
|
isUiMeta,
|
|
@@ -2001,6 +2005,7 @@ export {
|
|
|
2001
2005
|
useBackgroundStore,
|
|
2002
2006
|
useBackgroundTasks,
|
|
2003
2007
|
useBladeClient,
|
|
2008
|
+
useBladeConnection,
|
|
2004
2009
|
useCardContext,
|
|
2005
2010
|
useCardState,
|
|
2006
2011
|
useCardStateStore,
|