Compare commits

...

1 Commits

Author SHA1 Message Date
celestial-vault dfcd61667e remove remaining postMessage calls 2025-06-24 15:21:53 -07:00
3 changed files with 16 additions and 23 deletions
@@ -21,13 +21,6 @@ import {
} from "@vscode/webview-ui-toolkit/react"
function Demo() {
// function handleHowdyClick() {
// vscode.postMessage({
// command: "hello",
// text: "Hey there partner! 🤠",
// })
// }
const rowData = [
{
cell1: "Cell Data",
@@ -11,10 +11,12 @@ import {
import { McpMarketplaceItem } from "@shared/mcp"
import { useExtensionState } from "@/context/ExtensionStateContext"
import { vscode } from "@/utils/vscode"
import { McpServiceClient } from "@/services/grpc-client"
import { EmptyRequest } from "@shared/proto/common"
import McpMarketplaceCard from "./McpMarketplaceCard"
import McpSubmitCard from "./McpSubmitCard"
const McpMarketplaceView = () => {
const { mcpServers, mcpMarketplaceCatalog } = useExtensionState()
const { mcpServers, mcpMarketplaceCatalog, setMcpMarketplaceCatalog, mcpMarketplaceEnabled } = useExtensionState()
const [isLoading, setIsLoading] = useState(true)
const [error, setError] = useState<string | null>(null)
const [isRefreshing, setIsRefreshing] = useState(false)
@@ -92,7 +94,19 @@ const McpMarketplaceView = () => {
setIsLoading(true)
}
setError(null)
vscode.postMessage({ type: "fetchMcpMarketplace", bool: forceRefresh })
if (mcpMarketplaceEnabled) {
McpServiceClient.refreshMcpMarketplace(EmptyRequest.create({}))
.then((response) => {
setMcpMarketplaceCatalog(response)
})
.catch((error) => {
console.error("Error refreshing MCP marketplace:", error)
setError("Failed to load marketplace data")
setIsLoading(false)
setIsRefreshing(false)
})
}
}
if (isLoading || isRefreshing) {
@@ -1529,20 +1529,6 @@ const ApiOptions = ({
</VSCodeLink>
)}
</p>
{/* Note: To fully implement this, you would need to add a handler in ClineProvider.ts */}
{/* {apiConfiguration?.xaiApiKey && (
<button
onClick={() => {
vscode.postMessage({
type: "requestXAIModels",
text: apiConfiguration?.xaiApiKey,
})
}}
style={{ margin: "5px 0 0 0" }}
className="vscode-button">
Fetch Available Models
</button>
)} */}
</div>
)}