refactor(json): Consolidate JSON utilities and type definitions
Modified files: - client/src/components/DynamicJsonForm.tsx - client/src/components/JsonView.tsx - client/src/components/ToolsTab.tsx - client/src/components/__tests__/DynamicJsonForm.test.tsx - client/src/utils/__tests__/jsonPathUtils.test.ts → client/src/utils/__tests__/jsonUtils.test.ts - client/src/utils/__tests__/schemaUtils.test.ts - client/src/utils/jsonPathUtils.ts → client/src/utils/jsonUtils.ts - client/src/utils/schemaUtils.ts Descriptions: - Move JSON type definitions from DynamicJsonForm to centralized jsonUtils - Consolidate utility functions (getDataType, tryParseJson) into jsonUtils - Rename jsonPathUtils to jsonUtils for better semantic clarity - Add comprehensive test coverage for new utility functions - Update imports across all affected components - Improve type references consistency throughout the codebase
This commit is contained in:
@@ -5,7 +5,8 @@ import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { TabsContent } from "@/components/ui/tabs";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import DynamicJsonForm, { JsonSchemaType, JsonValue } from "./DynamicJsonForm";
|
||||
import DynamicJsonForm from "./DynamicJsonForm";
|
||||
import type { JsonValue, JsonSchemaType } from "@/utils/jsonUtils";
|
||||
import { generateDefaultValue } from "@/utils/schemaUtils";
|
||||
import {
|
||||
CallToolResultSchema,
|
||||
|
||||
Reference in New Issue
Block a user