Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript

diff: the prompt hint reads the viewport's layout through a type that may lack it (#94843)

Alice T'Poteat744fb6ab02ac
diff --git a/mods/diff/hooks/register.ts b/mods/diff/hooks/register.ts
index 019db9dd..f150ce98 100644
--- a/mods/diff/hooks/register.ts
+++ b/mods/diff/hooks/register.ts
@@ -621,11 +621,14 @@ export function register(on: On) {
on('ui.render', { component: 'PromptHint' }, ($, e, next) => {
if (isOnPaneSurface(e)) {
- columns = e.viewport?.columns ?? columns
+ const viewport: { columns?: number; isFullscreen?: boolean } | undefined =
+ e.viewport
+
+ columns = viewport?.columns ?? columns
model = {
...model,
- isFullscreen: e.viewport?.isFullscreen ?? model.isFullscreen,
+ isFullscreen: viewport?.isFullscreen ?? model.isFullscreen,
}
}