Skip to content

Commit 0ffedbf

Browse files
committed
fix type errors
1 parent c6a1142 commit 0ffedbf

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
server/build
44
client/dist
55
client/tsconfig.app.tsbuildinfo
6+
client/tsconfig.node.tsbuildinfo

client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"react": "^18.3.1",
2323
"react-dom": "^18.3.1",
2424
"tailwind-merge": "^2.5.3",
25-
"tailwindcss-animate": "^1.0.7"
25+
"tailwindcss-animate": "^1.0.7",
26+
"zod": "^3.23.8"
2627
},
2728
"devDependencies": {
2829
"@eslint/js": "^9.11.1",

client/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import NotificationsTab from "./components/NotificationsTab";
4040
import PromptsTab, { Prompt } from "./components/PromptsTab";
4141
import ToolsTab from "./components/ToolsTab";
4242
import History from "./components/History";
43-
import { AnyZodObject } from "node_modules/zod/lib";
43+
import { AnyZodObject } from "zod";
4444

4545
const App = () => {
4646
const [connectionStatus, setConnectionStatus] = useState<

client/src/components/ResourcesTab.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import { TabsContent } from "@/components/ui/tabs";
55
import { Resource } from "mcp-typescript/types.js";
66
import ListPane from "./ListPane";
77

8-
export type Resource = {
9-
uri: string;
10-
name: string;
11-
};
12-
138
const ResourcesTab = ({
149
resources,
1510
listResources,
@@ -38,7 +33,7 @@ const ResourcesTab = ({
3833
renderItem={(resource) => (
3934
<div className="flex items-center w-full">
4035
<FileText className="w-4 h-4 mr-2 flex-shrink-0 text-gray-500" />
41-
<span className="flex-1 truncate" title={resource.uri}>
36+
<span className="flex-1 truncate" title={resource.uri.toString()}>
4237
{resource.name}
4338
</span>
4439
<ChevronRight className="w-4 h-4 flex-shrink-0 text-gray-400" />

client/src/components/ToolsTab.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const ToolsTab = ({
6161
<p className="text-sm text-gray-600">
6262
{selectedTool.description}
6363
</p>
64-
{Object.entries(selectedTool.inputSchema.properties).map(
64+
{Object.entries(selectedTool.inputSchema.properties ?? []).map(
6565
([key, value]) => (
6666
<div key={key}>
6767
<Label
@@ -71,14 +71,17 @@ const ToolsTab = ({
7171
{key}
7272
</Label>
7373
<Input
74+
// @ts-expect-error value type is currently unknown
7475
type={value.type === "number" ? "number" : "text"}
7576
id={key}
7677
name={key}
78+
// @ts-expect-error value type is currently unknown
7779
placeholder={value.description}
7880
onChange={(e) =>
7981
setParams({
8082
...params,
8183
[key]:
84+
// @ts-expect-error value type is currently unknown
8285
value.type === "number"
8386
? Number(e.target.value)
8487
: e.target.value,

client/tsconfig.node.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./vite.config.ts"],"version":"5.6.2"}
1+
{"root":["./vite.config.ts"],"version":"5.6.3"}

0 commit comments

Comments
 (0)