chore: marketplace rebase to latest fixes

This commit is contained in:
NamesMT 2025-05-22 06:22:19 +00:00 committed by hannesrudolph
parent dad448afd2
commit 0de49f2799
4 changed files with 943 additions and 33 deletions

908
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -224,22 +224,22 @@
"when": "view == roo-cline.SidebarProvider"
},
{
"command": "roo-cline.historyButtonClicked",
"command": "roo-cline.marketplaceButtonClicked",
"group": "navigation@4",
"when": "view == roo-cline.SidebarProvider"
},
{
"command": "roo-cline.popoutButtonClicked",
"command": "roo-cline.historyButtonClicked",
"group": "navigation@5",
"when": "view == roo-cline.SidebarProvider"
},
{
"command": "roo-cline.settingsButtonClicked",
"command": "roo-cline.popoutButtonClicked",
"group": "navigation@6",
"when": "view == roo-cline.SidebarProvider"
},
{
"command": "roo-cline.marketplaceButtonClicked",
"command": "roo-cline.settingsButtonClicked",
"group": "navigation@7",
"when": "view == roo-cline.SidebarProvider"
}
@ -261,24 +261,26 @@
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
},
{
"command": "roo-cline.historyButtonClicked",
"command": "roo-cline.marketplaceButtonClicked",
"group": "navigation@4",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
},
{
"command": "roo-cline.popoutButtonClicked",
"command": "roo-cline.settingsButtonClicked",
"group": "navigation@7",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
}
],
"editor/title/context": [
{
"command": "roo-cline.historyButtonClicked",
"group": "navigation@5",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
},
{
"command": "roo-cline.settingsButtonClicked",
"command": "roo-cline.popoutButtonClicked",
"group": "navigation@6",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
},
{
"command": "roo-cline.marketplaceButtonClicked",
"group": "navigation@7",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
}
]
},
@ -365,6 +367,7 @@
"cheerio": "^1.0.0",
"chokidar": "^4.0.1",
"clone-deep": "^4.0.1",
"config-rocket": "^0.5.8",
"default-shell": "^2.2.0",
"delay": "^6.0.0",
"diff": "^5.2.0",
@ -393,6 +396,7 @@
"puppeteer-chromium-resolver": "^23.0.0",
"puppeteer-core": "^23.4.0",
"reconnecting-eventsource": "^1.6.4",
"roo-rocket": "^0.4.0",
"sanitize-filename": "^1.6.3",
"say": "^0.16.0",
"serialize-error": "^11.0.3",
@ -415,9 +419,9 @@
"@changesets/cli": "^2.27.10",
"@changesets/types": "^6.0.0",
"@jest/globals": "^29.7.0",
"@roo-code/build": "workspace:^",
"@roo-code/config-eslint": "workspace:^",
"@roo-code/config-typescript": "workspace:^",
"@roo-code/build": "workspace:^",
"@types/clone-deep": "^4.0.4",
"@types/debug": "^4.1.12",
"@types/diff": "^5.2.1",

View file

@ -206,6 +206,8 @@ describe("MarketplaceView", () => {
setTerminalCompressProgressBar: jest.fn(),
historyPreviewCollapsed: false,
setHistoryPreviewCollapsed: jest.fn(),
autoCondenseContextPercent: 100,
setAutoCondenseContextPercent: jest.fn(),
setMarketplaceSources: jest.fn(),
version: "1.0.0",
clineMessages: [],

View file

@ -160,10 +160,10 @@ describe("MarketplaceViewStateManager", () => {
payload: { items: initialItems },
})
// First switch to sources
// First switch to settings
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
// Switch back to browse
@ -188,10 +188,10 @@ describe("MarketplaceViewStateManager", () => {
expect(state.displayItems).toEqual(initialItems)
expect(state.allItems).toEqual(initialItems)
// Switch to sources again
// Switch to settings again
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
// Switch back to browse again
@ -251,10 +251,10 @@ describe("MarketplaceViewStateManager", () => {
payload: { items: initialItems },
})
// Switch to sources tab
// Switch to settings tab
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
// Switch back to browse
@ -601,20 +601,20 @@ describe("MarketplaceViewStateManager", () => {
it("should handle SET_ACTIVE_TAB transition", async () => {
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
const state = manager.getState()
expect(state.activeTab).toBe("sources")
expect(state.activeTab).toBe("settings")
})
it("should trigger initial fetch when switching to browse with no items", async () => {
jest.clearAllMocks() // Clear mock to ignore initialize() call
// Start in sources tab
// Start in settings tab
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
// Switch to browse tab
@ -638,10 +638,10 @@ describe("MarketplaceViewStateManager", () => {
payload: { items: [createTestItem()] },
})
// Switch to sources tab
// Switch to settings tab
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
// Switch back to browse tab
@ -684,10 +684,10 @@ describe("MarketplaceViewStateManager", () => {
})
})
it("should not trigger fetch when switching to sources tab", async () => {
it("should not trigger fetch when switching to settings tab", async () => {
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
expect(vscode.postMessage).not.toHaveBeenCalledWith({
@ -726,11 +726,11 @@ describe("MarketplaceViewStateManager", () => {
expect(state.allItems).toHaveLength(1)
})
it("should not switch tabs when timeout occurs while in sources tab", async () => {
// First switch to sources tab
it("should not switch tabs when timeout occurs while in settings tab", async () => {
// First switch to settings tab
await manager.transition({
type: "SET_ACTIVE_TAB",
payload: { tab: "sources" },
payload: { tab: "settings" },
})
// Start a fetch
@ -753,7 +753,7 @@ describe("MarketplaceViewStateManager", () => {
// Verify the tab didn't switch to browse
expect(tabSwitched).toBe(false)
const state = manager.getState()
expect(state.activeTab).toBe("sources")
expect(state.activeTab).toBe("settings")
})
it("should make minimal state updates when timeout occurs in browse tab", async () => {