Skip to content

Commit 52b5c39

Browse files
committed
chore: fix type, format
1 parent e4427c6 commit 52b5c39

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/common/config/configOverrides.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function applyConfigOverrides({
4343
assertValidConfigKey(key);
4444
const meta = getConfigMeta(key);
4545
const behavior = meta?.overrideBehavior || "not-allowed";
46-
const baseValue = baseConfig[key as keyof UserConfig];
46+
const baseValue = baseConfig[key];
4747
const newValue = applyOverride(key, baseValue, overrideValue, behavior);
4848
(result as Record<keyof UserConfig, unknown>)[key] = newValue;
4949
}
@@ -59,7 +59,7 @@ export function applyConfigOverrides({
5959
}
6060

6161
const behavior = meta?.overrideBehavior || "not-allowed";
62-
const baseValue = baseConfig[key as keyof UserConfig];
62+
const baseValue = baseConfig[key];
6363
const newValue = applyOverride(key, baseValue, overrideValue, behavior);
6464
(result as Record<keyof UserConfig, unknown>)[key] = newValue;
6565
}

src/elicitation.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ElicitRequestFormParams } from "@modelcontextprotocol/sdk/types.js";
1+
import type { ElicitRequestParams } from "@modelcontextprotocol/sdk/types.js";
22
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
33

44
export class Elicitation {
@@ -27,6 +27,7 @@ export class Elicitation {
2727
}
2828

2929
const result = await this.server.elicitInput({
30+
mode: "form",
3031
message,
3132
requestedSchema: Elicitation.CONFIRMATION_SCHEMA,
3233
});
@@ -37,17 +38,17 @@ export class Elicitation {
3738
* The schema for the confirmation question.
3839
* TODO: In the future would be good to use Zod 4's toJSONSchema() to generate the schema.
3940
*/
40-
public static CONFIRMATION_SCHEMA: ElicitRequestFormParams["requestedSchema"] = {
41-
type: "object",
41+
public static CONFIRMATION_SCHEMA = {
42+
type: "object" as const,
4243
properties: {
4344
confirmation: {
44-
type: "string",
45+
type: "string" as const,
4546
title: "Would you like to confirm?",
4647
description: "Would you like to confirm?",
4748
enum: ["Yes", "No"],
4849
enumNames: ["Yes, I confirm", "No, I do not confirm"],
4950
},
5051
},
5152
required: ["confirmation"],
52-
};
53+
} satisfies ElicitRequestParams["requestedSchema"];
5354
}

0 commit comments

Comments
 (0)