Skip to content

Commit

Permalink
Limit image width in chat
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed May 18, 2024
1 parent 9f83563 commit 9e4ce5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/chat/browser/media/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@
line-height: 1.3rem;
}

.interactive-item-container .value .rendered-markdown img {
max-width: 100%;
}

.interactive-item-container .monaco-tokenized-source,
.interactive-item-container code {
font-family: var(--monaco-monospace-font);
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/chat/common/chatAgents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,5 +503,9 @@ export function reviveSerializedAgent(raw: ISerializableChatAgentData): IChatAge
agent.extensionDisplayName = '';
}

if (!('extensionId' in agent)) {
agent.extensionId = new ExtensionIdentifier('');
}

return revive(agent);
}
2 changes: 2 additions & 0 deletions src/vscode-dts/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18690,6 +18690,7 @@ declare module 'vscode' {
/**
* Push a markdown part to this stream. Short-hand for
* `push(new ChatResponseMarkdownPart(value))`.
* Note: Only the first 100,000 characters will be rendered.
*
* @see {@link ChatResponseStream.push}
* @param value A markdown string or a string that should be interpreted as markdown. The boolean form of {@link MarkdownString.isTrusted} is NOT supported.
Expand Down Expand Up @@ -18770,6 +18771,7 @@ declare module 'vscode' {

/**
* Create a new ChatResponseMarkdownPart.
* Note: Only the first 100,000 characters will be rendered.
*
* @param value A markdown string or a string that should be interpreted as markdown. The boolean form of {@link MarkdownString.isTrusted} is NOT supported.
*/
Expand Down

0 comments on commit 9e4ce5a

Please sign in to comment.