Skip to content

Commit 0be62c8

Browse files
committed
fix: resolve remaining lint errors in mcp-update-env-app
1 parent da3e89e commit 0be62c8

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

src/mcp/apps/update_environment/mcp-app.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { App, applyDocumentTheme, applyHostStyleVariables, applyHostFonts } from "@modelcontextprotocol/ext-apps";
1+
import {
2+
App,
3+
applyDocumentTheme,
4+
applyHostStyleVariables,
5+
applyHostFonts,
6+
} from "@modelcontextprotocol/ext-apps";
27

38
const app = new App({ name: "Update Firebase Environment", version: "1.0.0" });
49

@@ -13,7 +18,6 @@ let selectedProjectId: string | null = null;
1318

1419
const envProjectIdEl = document.getElementById("env-project-id") as HTMLSpanElement;
1520
const envUserEl = document.getElementById("env-user") as HTMLSpanElement;
16-
const currentEnvBox = document.getElementById("current-env") as HTMLDivElement;
1721

1822
function showStatus(message: string, type: "success" | "error" | "info") {
1923
statusBox.textContent = message;
@@ -99,10 +103,6 @@ submitBtn.onclick = async () => {
99103
}
100104
};
101105

102-
app.ontoolresult = (result: any) => {
103-
// We can handle tool results if needed, but we rely on manual triggers for list_projects
104-
};
105-
106106
app.onhostcontextchanged = (ctx: any) => {
107107
if (ctx.theme) applyDocumentTheme(ctx.theme);
108108
if (ctx.styles?.variables) applyHostStyleVariables(ctx.styles.variables);
@@ -120,7 +120,10 @@ app.onhostcontextchanged = (ctx: any) => {
120120

121121
// Fetch current environment
122122
try {
123-
const envResult = await app.callServerTool({ name: "firebase_get_environment", arguments: {} });
123+
const envResult = await app.callServerTool({
124+
name: "firebase_get_environment",
125+
arguments: {},
126+
});
124127
const envData = envResult.structuredContent as any;
125128
if (envData) {
126129
envProjectIdEl.textContent = envData.projectId || "<NONE>";
@@ -140,7 +143,9 @@ app.onhostcontextchanged = (ctx: any) => {
140143
filteredProjects = projects;
141144
renderProjects();
142145
showStatus("Projects loaded successfully.", "success");
143-
setTimeout(() => { if (statusBox.className === "status success") statusBox.style.display = "none"; }, 3000);
146+
setTimeout(() => {
147+
if (statusBox.className === "status success") statusBox.style.display = "none";
148+
}, 3000);
144149
} else {
145150
showStatus("No projects returned from server.", "error");
146151
}

src/mcp/resources/update_environment_ui.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { resource } from "../resource";
2-
import { McpContext } from "../types";
32
import * as path from "path";
43
import * as fs from "fs/promises";
54

@@ -13,7 +12,7 @@ export const update_environment_ui = resource(
1312
description: "Visual interface for selecting active Firebase project",
1413
mimeType: RESOURCE_MIME_TYPE,
1514
},
16-
async (uri: string, ctx: McpContext) => {
15+
async () => {
1716
try {
1817
const htmlPath = path.join(__dirname, "../apps/update_environment/mcp-app.html");
1918
const html = await fs.readFile(htmlPath, "utf-8");

0 commit comments

Comments
 (0)