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
6 changes: 4 additions & 2 deletions plugin/ui/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ def update(self) -> None:
"""Update the conversation sheet content."""
if not (sheet := self.window.transient_sheet_in_group(self.manager.group_id)):
return
if not isinstance(sheet, sublime.HtmlSheet):
return

mdpopups.update_html_sheet(sheet=sheet, contents=self.completion_content, md=True, wrapper_class="wrapper")

Expand All @@ -194,7 +196,7 @@ def close(self) -> None:
self.manager.is_visible = False
self.manager.window.run_command("hide_panel")
if self.manager.original_layout:
self.window.set_layout(self.manager.original_layout)
self.window.set_layout(self.manager.original_layout) # pyright: ignore[reportArgumentType]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a problem when testing in LSP repo - https://github.com/sublimelsp/LSP/actions/runs/28530627354/job/84578855392

The types of ST layout are:

  • custom Layout in LSP-copilot stubs
  • dict[str, Any] in LSP stubs
  • dict[str, Value] in ST's own types

So it's all a mess that's why I'm just ignoring those issues.

self.manager.original_layout = None

if view := self.window.active_view():
Expand All @@ -217,7 +219,7 @@ def _open_in_group(self, window: sublime.Window, group_id: int) -> None:

def _open_in_side_by_side(self, window: sublime.Window) -> None:
"""Open the conversation sheet in side-by-side layout."""
self.manager.original_layout = window.layout()
self.manager.original_layout = window.layout() # pyright: ignore[reportAttributeAccessIssue]
window.set_layout({
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
Expand Down
1 change: 0 additions & 1 deletion plugin/ui/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def show(self) -> None:
view=self.view,
content=self.popup_content,
md=True,
layout=sublime.LAYOUT_INLINE,
flags=sublime.COOPERATE_WITH_AUTO_COMPLETE,
max_width=640,
)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ignore = [
]
stubPath = 'typings'
pythonVersion = '3.8'
typeCheckingMode = 'standard'

[tool.ruff]
preview = true
Expand Down
Loading