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
1 change: 1 addition & 0 deletions docs/docs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ wsh editconfig
| term:scrollback | int | size of terminal scrollback buffer, max is 10000 |
| term:theme | string | preset name of terminal theme to apply by default (default is "default-dark") |
| term:transparency | float64 | set the background transparency of terminal theme (default 0.5, 0 = not transparent, 1.0 = fully transparent) |
| term:allowbracketedpaste | bool | allow bracketed paste mode in terminal (default false) |
| editor:minimapenabled | bool | set to false to disable editor minimap |
| editor:stickyscrollenabled | bool | enables monaco editor's stickyScroll feature (pinning headers of current context, e.g. class names, method names, etc.), defaults to false |
| editor:wordwrap | bool | set to true to enable word wrapping in the editor (defaults to false) |
Expand Down
3 changes: 3 additions & 0 deletions frontend/app/view/term/term.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ const TerminalView = ({ blockId, model }: TerminalViewProps) => {
const fullConfig = globalStore.get(atoms.fullConfigAtom);
const termThemeName = globalStore.get(model.termThemeNameAtom);
const termTransparency = globalStore.get(model.termTransparencyAtom);
const termBPMAtom = getOverrideConfigAtom(blockId, "term:allowbracketedpaste");
const [termTheme, _] = computeTheme(fullConfig, termThemeName, termTransparency);
let termScrollback = 1000;
if (termSettings?.["term:scrollback"]) {
Expand All @@ -941,6 +942,7 @@ const TerminalView = ({ blockId, model }: TerminalViewProps) => {
if (termScrollback > 10000) {
termScrollback = 10000;
}
const termAllowBPM = globalStore.get(termBPMAtom) ?? false;
const wasFocused = model.termRef.current != null && globalStore.get(model.nodeModel.isFocused);
const termWrap = new TermWrap(
blockId,
Expand All @@ -955,6 +957,7 @@ const TerminalView = ({ blockId, model }: TerminalViewProps) => {
allowTransparency: true,
scrollback: termScrollback,
allowProposedApi: true, // Required by @xterm/addon-search to enable search functionality and decorations
ignoreBracketedPasteMode: !termAllowBPM,
},
{
keydownHandler: model.handleTerminalKeydown.bind(model),
Expand Down
2 changes: 2 additions & 0 deletions frontend/types/gotypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ declare global {
"term:vdomblockid"?: string;
"term:vdomtoolbarblockid"?: string;
"term:transparency"?: number;
"term:allowbracketedpaste"?: boolean;
"web:zoom"?: number;
"web:hidenav"?: boolean;
"markdown:fontsize"?: number;
Expand Down Expand Up @@ -599,6 +600,7 @@ declare global {
"term:scrollback"?: number;
"term:copyonselect"?: boolean;
"term:transparency"?: number;
"term:allowbracketedpaste"?: boolean;
"editor:minimapenabled"?: boolean;
"editor:stickyscrollenabled"?: boolean;
"editor:wordwrap"?: boolean;
Expand Down
1 change: 1 addition & 0 deletions pkg/waveobj/metaconsts.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const (
MetaKey_TermVDomSubBlockId = "term:vdomblockid"
MetaKey_TermVDomToolbarBlockId = "term:vdomtoolbarblockid"
MetaKey_TermTransparency = "term:transparency"
MetaKey_TermAllowBracketedPaste = "term:allowbracketedpaste"

MetaKey_WebZoom = "web:zoom"
MetaKey_WebHideNav = "web:hidenav"
Expand Down
23 changes: 12 additions & 11 deletions pkg/waveobj/wtypemeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,18 @@ type MetaTSType struct {
BgBorderColor string `json:"bg:bordercolor,omitempty"` // frame:bordercolor
BgActiveBorderColor string `json:"bg:activebordercolor,omitempty"` // frame:activebordercolor

TermClear bool `json:"term:*,omitempty"`
TermFontSize int `json:"term:fontsize,omitempty"`
TermFontFamily string `json:"term:fontfamily,omitempty"`
TermMode string `json:"term:mode,omitempty"`
TermTheme string `json:"term:theme,omitempty"`
TermLocalShellPath string `json:"term:localshellpath,omitempty"` // matches settings
TermLocalShellOpts []string `json:"term:localshellopts,omitempty"` // matches settings
TermScrollback *int `json:"term:scrollback,omitempty"`
TermVDomSubBlockId string `json:"term:vdomblockid,omitempty"`
TermVDomToolbarBlockId string `json:"term:vdomtoolbarblockid,omitempty"`
TermTransparency *float64 `json:"term:transparency,omitempty"` // default 0.5
TermClear bool `json:"term:*,omitempty"`
TermFontSize int `json:"term:fontsize,omitempty"`
TermFontFamily string `json:"term:fontfamily,omitempty"`
TermMode string `json:"term:mode,omitempty"`
TermTheme string `json:"term:theme,omitempty"`
TermLocalShellPath string `json:"term:localshellpath,omitempty"` // matches settings
TermLocalShellOpts []string `json:"term:localshellopts,omitempty"` // matches settings
TermScrollback *int `json:"term:scrollback,omitempty"`
TermVDomSubBlockId string `json:"term:vdomblockid,omitempty"`
TermVDomToolbarBlockId string `json:"term:vdomtoolbarblockid,omitempty"`
TermTransparency *float64 `json:"term:transparency,omitempty"` // default 0.5
TermAllowBracketedPaste *bool `json:"term:allowbracketedpaste,omitempty"`

WebZoom float64 `json:"web:zoom,omitempty"`
WebHideNav *bool `json:"web:hidenav,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions pkg/wconfig/metaconsts.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const (
ConfigKey_TermScrollback = "term:scrollback"
ConfigKey_TermCopyOnSelect = "term:copyonselect"
ConfigKey_TermTransparency = "term:transparency"
ConfigKey_TermAllowBracketedPaste = "term:allowbracketedpaste"

ConfigKey_EditorMinimapEnabled = "editor:minimapenabled"
ConfigKey_EditorStickyScrollEnabled = "editor:stickyscrollenabled"
Expand Down
21 changes: 11 additions & 10 deletions pkg/wconfig/settingsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,17 @@ type SettingsType struct {
AiFontSize float64 `json:"ai:fontsize,omitempty"`
AiFixedFontSize float64 `json:"ai:fixedfontsize,omitempty"`

TermClear bool `json:"term:*,omitempty"`
TermFontSize float64 `json:"term:fontsize,omitempty"`
TermFontFamily string `json:"term:fontfamily,omitempty"`
TermTheme string `json:"term:theme,omitempty"`
TermDisableWebGl bool `json:"term:disablewebgl,omitempty"`
TermLocalShellPath string `json:"term:localshellpath,omitempty"`
TermLocalShellOpts []string `json:"term:localshellopts,omitempty"`
TermScrollback *int64 `json:"term:scrollback,omitempty"`
TermCopyOnSelect *bool `json:"term:copyonselect,omitempty"`
TermTransparency *float64 `json:"term:transparency,omitempty"`
TermClear bool `json:"term:*,omitempty"`
TermFontSize float64 `json:"term:fontsize,omitempty"`
TermFontFamily string `json:"term:fontfamily,omitempty"`
TermTheme string `json:"term:theme,omitempty"`
TermDisableWebGl bool `json:"term:disablewebgl,omitempty"`
TermLocalShellPath string `json:"term:localshellpath,omitempty"`
TermLocalShellOpts []string `json:"term:localshellopts,omitempty"`
TermScrollback *int64 `json:"term:scrollback,omitempty"`
TermCopyOnSelect *bool `json:"term:copyonselect,omitempty"`
TermTransparency *float64 `json:"term:transparency,omitempty"`
Comment on lines +54 to +63
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Removing terminal settings will break terminal functionality

The terminal settings fields are actively used in the frontend code (frontend/app/view/term/term.tsx) for critical functionality:

  • Visual settings (theme, font, transparency)
  • Terminal behavior (scrollback, WebGL)
  • Shell configuration
  • The removal needs to be reverted or these settings need to be migrated to maintain terminal functionality
🔗 Analysis chain

Verify the impact of removing terminal settings fields.

Multiple terminal configuration fields have been removed. Please confirm if this is intentional and whether there are any migration steps needed for existing configurations.

Run the following script to check for usage of the removed settings:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for usage of removed terminal settings
# Search for usage of removed terminal settings in the codebase

echo "Checking for usage of removed terminal settings..."
for setting in "term:*" "term:fontsize" "term:fontfamily" "term:theme" "term:disablewebgl" \
               "term:localshellpath" "term:localshellopts" "term:scrollback" \
               "term:copyonselect" "term:transparency"; do
    echo "Checking setting: $setting"
    rg -l "$setting"
done

Length of output: 10942


Script:

#!/bin/bash
# Check implementation details in term.tsx and recent changes

echo "Checking term.tsx implementation:"
rg -A 5 -B 5 "term:(fontsize|fontfamily|theme|disablewebgl|localshellpath|localshellopts|scrollback|copyonselect|transparency)" "frontend/app/view/term/term.tsx"

echo -e "\nChecking for recent changes:"
rg -A 5 -B 5 "term:" "RELEASES.md"

Length of output: 7475


Script:

#!/bin/bash
# Check for migration or replacement of terminal settings

echo "Checking for migration or replacement:"
rg -A 10 -B 10 "term:" "pkg/wconfig/defaultconfig/settings.json"

echo -e "\nChecking recent commits for terminal changes:"
git log --oneline -n 10 -- pkg/wconfig/settingsconfig.go frontend/app/view/term/

Length of output: 657

TermAllowBracketedPaste *bool `json:"term:allowbracketedpaste,omitempty"`

EditorMinimapEnabled bool `json:"editor:minimapenabled,omitempty"`
EditorStickyScrollEnabled bool `json:"editor:stickyscrollenabled,omitempty"`
Expand Down
Loading