Commit graph inspector/client/src/components/JsonView.tsx
Author SHA1 Message Date
Dinesht04
c5fda85c20 fix: add horizontal scrolling for long values in json view 2026-04-04 15:41:24 +05:30
Ola Hungerford
f013291f34
Merge pull request #858 from cliffhall/fix-lint
Fix linter complaints
2025-10-10 19:08:26 -07:00
cliffhall
4e90143071 Fix linter complaints
* In JsonView.tsx
  - add setCopied to dependencies of handleCopy useCallback
* In useCopy.ts
  - add timeout to useEffect inside useCopy hook
2025-10-10 11:45:18 -04:00
lorenzo.neumann
fde922130d Merge branch 'main' of https://github.com/modelcontextprotocol/inspector into json_view_copy_button 2025-10-02 09:21:46 +02:00
Alejandro Borbolla
2fd781ab81
fix: CI by removing unused useEffect 2025-09-01 18:32:16 +02:00
lorenzo.neumann
cf3c0ec470 added copy functionality to JsonView component 2025-08-28 12:20:27 +02:00
Alejandro Borbolla
8589faa4c4
refactor: Use useCopy() in JsonView 2025-07-31 17:39:53 +02:00
cliffhall
79a09f8316 Consolidate hooks
* Hooks are in multiple places in the codebase and some camelCase, some snake-case. This PR relocates them all to the lib/hooks folder and normalizes camelCase naming. Settled on src/client/lib/hooks for the location since most of them were already there.

  - Refactor/move useTheme.ts from client/src/lib to client/src/lib/hooks
  - Refactor/move useToast.ts from client/src/hooks/ to client/src/lib/hooks/useToast.ts
  - Removed client/src/hooks
2025-04-30 17:09:22 -04:00
kavinkumarbaskar
1175af1074 fix: missing condition for lengthy strings 2025-04-12 17:54:17 +05:30
kavinkumarbaskar
1596973b05 Merge branch 'main' into highlight-tool-errors-in-red-text 2025-04-09 22:47:12 +05:30
yushengchen
fe74dbea74 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
2025-04-09 09:20:02 +08:00
kavinkumarbaskar
ca1854b071 ran npm run prettier-fix command to fix the code styling 2025-04-05 23:32:10 +05:30
kavinkumarbaskar
a3be8f6376 feat: highlight tool errors in red text 2025-04-05 23:24:10 +05:30
NicolasMontone
5db5fc26c7 fix prettier 2025-04-02 10:42:52 -03:00
NicolasMontone
8b31f495ba fix unkown type. 2025-04-02 10:41:33 -03:00
NicolasMontone
c964ff5cfe Use copy button insde JSON view component 2025-04-02 10:39:39 -03:00
NicolasMontone
539de0fd85 add copy button 2025-04-01 17:18:40 -03:00
cgoing
18ca6e28a7 Use <pre> tag inside JsonView component for consistency 2025-03-27 12:55:36 +09:00
cgoing
2d252a389c Remove escapeUnicode function from ToolsTab.tsx 2025-03-27 11:42:39 +09:00
cgoing
e6f5da8383 Improve JsonView component styling and change to use JsonView in PromptsTab 2025-03-27 10:49:37 +09:00
cgoing
03c1ba3092 Change JsonView default initialExpandDepth from 2 to 3 2025-03-26 00:11:07 +09:00
cgoing
2588f3aeb3 Change tooltip title from Korean to English 2025-03-26 00:02:10 +09:00
cgoing
d204dd6e7e feat: json view component - dark color 2025-03-25 01:56:53 +09:00
cgoing
f0b28d4760 feat: json view component 2025-03-25 01:48:29 +09:00