Remove the Assistant Layout now that the Agent Layout exists

Open Beginner friendly
#17,646 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start with the files named in the issue: src/vs/workbench/services/positronLayout/browser/layouts/positronAssistantLayout.ts, positronCustomViews.ts, test/e2e/tests/layouts/layouts.test.ts, and test/e2e/pages/layouts.ts. Remove the Assistant Layout references, then search the docs and release notes for mentions; the issue says the codicon can remain. Done when the layout and skipped e2e block are removed and no relevant documentation mentions remain.

Written by the indexing model from the issue text.

Description

area: assistant area: ui

The Agent Layout (#15555) opens Posit Assistant in the editor area, with the Console, Variables and Plots in the Secondary Side Bar. It covers what the Assistant Layout was for, so I think we can remove the Assistant Layout.

Assistant Layout shows even when ai.enabled is off

Its precondition is an OR:

precondition: ContextKeyExpr.or(
	ChatContextKeys.aiFeaturesEnabled,
	ContextKeyExpr.has('config.assistant.enabled'),
)

So with ai.enabled: false and assistant.enabled: true, the second half is still true and the layout shows up in Customize Layout and the Command Palette. The Agent Layout uses ContextKeyExpr.and(config.ai.enabled, config.assistant.enabled), which works as expected.

Steps
  1. Turn on assistant.enabled and turn off ai.enabled
  2. Open Customize Layout from the title bar

"Assistant Layout" is listed under Layout Presets, even though the Posit Assistant view says AI features are disabled. "Agent Layout" is correctly hidden.

Customize Layout listing Assistant Layout while ai.enabled is off

Other reasons to remove it
  • When assistant.enabled is off, it opens workbench.panel.chat (the old Positron Assistant chat view). Positron Assistant has been removed, so that path is a leftover.
  • Its e2e tests are already skipped (test.describe.skip('Assistant Layout', ...) in test/e2e/tests/layouts/layouts.test.ts).
  • Having two AI layouts in the picker is a bit confusing.
What to change
  • Delete src/vs/workbench/services/positronLayout/browser/layouts/positronAssistantLayout.ts
  • Remove it from positronCustomLayoutOptions in positronCustomViews.ts
  • Remove the skipped Assistant Layout e2e block and the assistant entry in test/e2e/pages/layouts.ts
  • We could probably leave the positron-assistant-layout codicon in codiconsLibrary.ts, since it's part of the icon font
  • Check the docs and release notes for mentions of the Assistant Layout

Open question: if someone has a keybinding for workbench.action.positronAssistantLayout, do we need to do anything? I think it's fine for the command to just go away.

Related: #14718

Dominant language
TypeScript
Stars
4.4k
Forks
207
Avg merge
1d 16h
Merged PRs (30d)
308

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/positron

All issues in posit-dev/positron

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.