fix linting error
This commit is contained in:
parent
2a84ce3254
commit
87bb2425a3
1 changed files with 13 additions and 17 deletions
|
|
@ -13,20 +13,18 @@ type ToolListEntry = {
|
||||||
_meta: Record<string, unknown>;
|
_meta: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
|
|
||||||
let latestAppsTabProps:
|
type AppsTabProps = {
|
||||||
| {
|
tools: ToolListEntry[];
|
||||||
tools: ToolListEntry[];
|
prefilledToolCall?: {
|
||||||
prefilledToolCall?: {
|
id: number;
|
||||||
id: number;
|
toolName: string;
|
||||||
toolName: string;
|
params: Record<string, unknown>;
|
||||||
params: Record<string, unknown>;
|
result: {
|
||||||
result: {
|
content: Array<{ type: string; text: string }>;
|
||||||
content: Array<{ type: string; text: string }>;
|
};
|
||||||
};
|
} | null;
|
||||||
} | null;
|
onPrefilledToolCallConsumed?: (callId: number) => void;
|
||||||
onPrefilledToolCallConsumed?: (callId: number) => void;
|
};
|
||||||
}
|
|
||||||
| undefined;
|
|
||||||
|
|
||||||
// Mock auth dependencies first
|
// Mock auth dependencies first
|
||||||
jest.mock("@modelcontextprotocol/sdk/client/auth.js", () => ({
|
jest.mock("@modelcontextprotocol/sdk/client/auth.js", () => ({
|
||||||
|
|
@ -164,8 +162,7 @@ jest.mock("../components/ToolsTab", () => ({
|
||||||
|
|
||||||
jest.mock("../components/AppsTab", () => ({
|
jest.mock("../components/AppsTab", () => ({
|
||||||
__esModule: true,
|
__esModule: true,
|
||||||
default: (props: typeof latestAppsTabProps) => {
|
default: (props: AppsTabProps) => {
|
||||||
latestAppsTabProps = props;
|
|
||||||
const prefilled =
|
const prefilled =
|
||||||
props && "prefilledToolCall" in props ? props.prefilledToolCall : null;
|
props && "prefilledToolCall" in props ? props.prefilledToolCall : null;
|
||||||
const tools = props && "tools" in props ? props.tools : [];
|
const tools = props && "tools" in props ? props.tools : [];
|
||||||
|
|
@ -200,7 +197,6 @@ describe("App - Tools to Apps prefilled handoff", () => {
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
latestAppsTabProps = undefined;
|
|
||||||
window.location.hash = "#tools";
|
window.location.hash = "#tools";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue