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 @@ -37,6 +37,7 @@ wsh editconfig
| app:dismissarchitecturewarning | bool | Disable warnings on app start when you are using a non-native architecture for Wave. For more info, see [Why does Wave warn me about ARM64 translation when it launches?](./faq#why-does-wave-warn-me-about-arm64-translation-when-it-launches). |
| app:defaultnewblock | string | Sets the default new block (Cmd:n, Cmd:d). "term" for terminal block, "launcher" for launcher block (default = "term") |
| app:showoverlayblocknums | bool | Set to false to disable the Ctrl+Shift block number overlay that appears when holding Ctrl+Shift (defaults to true) |
| app:ctrlvpaste | bool | On Windows/Linux, when null (default) uses Control+V on Windows only. Set to true to force Control+V on all non-macOS platforms, false to disable the accelerator. macOS always uses Command+V regardless of this setting |
| ai:preset | string | the default AI preset to use |
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
| ai:apitoken | string | your AI api token |
Expand Down
19 changes: 16 additions & 3 deletions emain/emain-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,20 @@ async function getWorkspaceMenu(ww?: WaveBrowserWindow): Promise<Electron.MenuIt
return workspaceMenu;
}

function makeEditMenu(): Electron.MenuItemConstructorOptions[] {
function makeEditMenu(fullConfig?: FullConfigType): Electron.MenuItemConstructorOptions[] {
let pasteAccelerator: string;
if (unamePlatform === "darwin") {
pasteAccelerator = "Command+V";
} else {
const ctrlVPaste = fullConfig?.settings?.["app:ctrlvpaste"];
if (ctrlVPaste == null) {
pasteAccelerator = unamePlatform === "win32" ? "Control+V" : "";
} else if (ctrlVPaste) {
pasteAccelerator = "Control+V";
} else {
pasteAccelerator = "";
}
}
return [
{
role: "undo",
Expand All @@ -94,7 +107,7 @@ function makeEditMenu(): Electron.MenuItemConstructorOptions[] {
},
{
role: "paste",
accelerator: unamePlatform === "darwin" ? "Command+V" : "",
accelerator: pasteAccelerator,
},
{
role: "pasteAndMatchStyle",
Expand Down Expand Up @@ -312,7 +325,6 @@ async function makeFullAppMenu(callbacks: AppMenuCallbacks, workspaceOrBuilderId
const numWaveWindows = getAllWaveWindows().length;
const webContents = workspaceOrBuilderId && getWebContentsByWorkspaceOrBuilderId(workspaceOrBuilderId);
const appMenuItems = makeAppMenuItems(webContents);
const editMenu = makeEditMenu();

const isBuilderWindowFocused = focusedBuilderWindow != null;
let fullscreenOnLaunch = false;
Expand All @@ -323,6 +335,7 @@ async function makeFullAppMenu(callbacks: AppMenuCallbacks, workspaceOrBuilderId
} catch (e) {
console.error("Error fetching config:", e);
}
const editMenu = makeEditMenu(fullConfig);
const fileMenu = makeFileMenu(numWaveWindows, callbacks, fullConfig);
const viewMenu = makeViewMenu(webContents, callbacks, isBuilderWindowFocused, fullscreenOnLaunch);
let workspaceMenu: Electron.MenuItemConstructorOptions[] = null;
Expand Down
3 changes: 2 additions & 1 deletion frontend/types/gotypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare global {
"ai:model"?: string;
"ai:thinkinglevel"?: string;
"ai:endpoint"?: string;
"ai:apiversion"?: string;
"ai:azureapiversion"?: string;
"ai:apitoken"?: string;
"ai:apitokensecretname"?: string;
"ai:azureresourcename"?: string;
Expand Down Expand Up @@ -1051,6 +1051,7 @@ declare global {
"app:dismissarchitecturewarning"?: boolean;
"app:defaultnewblock"?: string;
"app:showoverlayblocknums"?: boolean;
"app:ctrlvpaste"?: boolean;
"feature:waveappbuilder"?: boolean;
"ai:*"?: boolean;
"ai:preset"?: string;
Expand Down
1 change: 1 addition & 0 deletions pkg/wconfig/metaconsts.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const (
ConfigKey_AppDismissArchitectureWarning = "app:dismissarchitecturewarning"
ConfigKey_AppDefaultNewBlock = "app:defaultnewblock"
ConfigKey_AppShowOverlayBlockNums = "app:showoverlayblocknums"
ConfigKey_AppCtrlVPaste = "app:ctrlvpaste"

ConfigKey_FeatureWaveAppBuilder = "feature:waveappbuilder"

Expand Down
1 change: 1 addition & 0 deletions pkg/wconfig/settingsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type SettingsType struct {
AppDismissArchitectureWarning bool `json:"app:dismissarchitecturewarning,omitempty"`
AppDefaultNewBlock string `json:"app:defaultnewblock,omitempty"`
AppShowOverlayBlockNums *bool `json:"app:showoverlayblocknums,omitempty"`
AppCtrlVPaste *bool `json:"app:ctrlvpaste,omitempty"`

FeatureWaveAppBuilder bool `json:"feature:waveappbuilder,omitempty"`

Expand Down
3 changes: 3 additions & 0 deletions schema/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"app:showoverlayblocknums": {
"type": "boolean"
},
"app:ctrlvpaste": {
"type": "boolean"
},
"feature:waveappbuilder": {
"type": "boolean"
},
Expand Down
4 changes: 2 additions & 2 deletions schema/waveai.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"ai:apitype": {
"type": "string",
"enum": [
"anthropic-messages",
"google-gemini",
"openai-responses",
"openai-chat"
]
Expand All @@ -49,7 +49,7 @@
"ai:endpoint": {
"type": "string"
},
"ai:apiversion": {
"ai:azureapiversion": {
"type": "string"
},
"ai:apitoken": {
Expand Down
Loading