Skip to content

Commit 16b838a

Browse files
Add layout options
1 parent 4462b57 commit 16b838a

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

js/configuration.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const DEFAULT_CONFIGURATIONS = {
2121
},
2222
appOptions: {
2323
showAIAssistant: true,
24-
ioLayout: "stack"
24+
ioLayout: "stack",
25+
assistantLayout: "column",
26+
mainLayout: "row"
2527
}
2628
},
2729
minimal: {
@@ -42,7 +44,9 @@ const DEFAULT_CONFIGURATIONS = {
4244
},
4345
appOptions: {
4446
showAIAssistant: false,
45-
ioLayout: "column"
47+
ioLayout: "column",
48+
assistantLayout: "column",
49+
mainLayout: "row"
4650
}
4751
},
4852
standalone: {
@@ -63,7 +67,9 @@ const DEFAULT_CONFIGURATIONS = {
6367
},
6468
appOptions: {
6569
showAIAssistant: true,
66-
ioLayout: "stack"
70+
ioLayout: "stack",
71+
assistantLayout: "column",
72+
mainLayout: "row"
6773
}
6874
},
6975
electron: {
@@ -84,7 +90,9 @@ const DEFAULT_CONFIGURATIONS = {
8490
},
8591
appOptions: {
8692
showAIAssistant: true,
87-
ioLayout: "stack"
93+
ioLayout: "stack",
94+
assistantLayout: "column",
95+
mainLayout: "row"
8896
}
8997
},
9098
puter: {
@@ -105,7 +113,9 @@ const DEFAULT_CONFIGURATIONS = {
105113
},
106114
appOptions: {
107115
showAIAssistant: true,
108-
ioLayout: "stack"
116+
ioLayout: "stack",
117+
assistantLayout: "column",
118+
mainLayout: "row"
109119
}
110120
}
111121
};
@@ -154,7 +164,8 @@ const LEGAL_VALUES = new Proxy({
154164
theme: ["system", "reverse-system", "light", "dark"],
155165
style: Object.keys(DEFAULT_CONFIGURATIONS),
156166
appOptions: {
157-
ioLayout: ["stack", "row", "column"]
167+
ioLayout: ["stack", "row", "column"],
168+
assistantLayout: ["stack", "row", "column"]
158169
}
159170
}, PROXY_HANDLER);
160171

js/ide.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var layoutConfig = {
5353
reorderEnabled: true
5454
},
5555
content: [{
56-
type: "row",
56+
type: configuration.get("appOptions.mainLayout"),
5757
content: [{
5858
type: "component",
5959
width: 66,
@@ -65,7 +65,8 @@ var layoutConfig = {
6565
readOnly: false
6666
}
6767
}, {
68-
type: "column",
68+
type: configuration.get("appOptions.assistantLayout"),
69+
title: "AI Assistant and I/O",
6970
content: [configuration.get("appOptions.showAIAssistant") ? {
7071
type: "component",
7172
height: 66,
@@ -78,6 +79,7 @@ var layoutConfig = {
7879
}
7980
} : null, {
8081
type: configuration.get("appOptions.ioLayout"),
82+
title: "I/O",
8183
content: [
8284
{
8385
type: "component",

0 commit comments

Comments
 (0)