@svadmin/core 0.20.1 → 0.20.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/core",
3
- "version": "0.20.1",
3
+ "version": "0.20.3",
4
4
  "author": "zuohuadong",
5
5
  "repository": {
6
6
  "type": "git",
@@ -183,7 +183,9 @@ export function getAgentProvider(): AgentProvider | null {
183
183
 
184
184
  // ─── Tool Approval ─────────────────────────────────────────────
185
185
 
186
- type ApprovalCallback = (approved: boolean) => void;
186
+ interface ApprovalCallback {
187
+ (approved: boolean): void;
188
+ }
187
189
  const pendingApprovals = new Map<string, ApprovalCallback>();
188
190
 
189
191
  /**
@@ -1,8 +1,8 @@
1
1
  // Minimal i18n — simple key-value translation
2
2
 
3
- type Locale = Record<string, string>;
4
3
 
5
- const locales: Record<string, Locale> = {
4
+
5
+ const locales: Record<string, Record<string, string>> = {
6
6
  'zh-CN': {
7
7
  // Common
8
8
  'common.save': '保存',
@@ -19,7 +19,9 @@ export function getUnsavedChanges(): boolean {
19
19
  * Frameworks like SvelteKit can register a cancel function here.
20
20
  * Return `true` to allow navigation, `false` to block it.
21
21
  */
22
- type NavigationGuard = (opts: { cancel: () => void }) => void;
22
+ interface NavigationGuard {
23
+ (opts: { cancel: () => void }): void;
24
+ }
23
25
 
24
26
  let _navigationGuard: NavigationGuard | null = null;
25
27