Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/webviews/chat/chatPanelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ export class ChatPanelProvider
: "dark";
}

private sendScrollToBottom(): void {
this.view?.webview.postMessage({ type: "coder:scroll-to-bottom" });
}

private sendTheme(): void {
this.view?.webview.postMessage({
type: "coder:set-theme",
Expand Down Expand Up @@ -129,7 +125,6 @@ export class ChatPanelProvider
break;
case "coder:chat-ready":
this.sendTheme();
this.sendScrollToBottom();
break;
case "coder:navigate": {
const url = msg.payload?.url;
Expand Down Expand Up @@ -284,11 +279,6 @@ export class ChatPanelProvider
}, '${allowedOrigin}');
}

if (data.type === 'coder:scroll-to-bottom') {
iframe.contentWindow.postMessage(
{ type: 'coder:scroll-to-bottom' }, '${allowedOrigin}');
}

if (data.type === 'coder:auth-error') {
status.textContent = '';
status.appendChild(document.createTextNode(data.error || 'Authentication failed.'));
Expand Down
10 changes: 0 additions & 10 deletions test/unit/webviews/chat/chatPanelProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,6 @@ describe("ChatPanelProvider", () => {
});
});

it("sends scroll-to-bottom on chat-ready", () => {
const { sendFromWebview, postMessage } = createHarness();

sendFromWebview({ type: "coder:chat-ready" });

expect(findPostedMessage(postMessage, "coder:scroll-to-bottom")).toEqual({
type: "coder:scroll-to-bottom",
});
});

it("sends theme when VS Code theme changes", () => {
const { postMessage } = createHarness();
postMessage.mockClear();
Expand Down