Commit 45891aa 1 parent 15e38a4 commit 45891aa Copy full SHA for 45891aa
File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ type Status struct {
48
48
49
49
type model struct {
50
50
conversationManager geppetto_conversation.Manager
51
+ autoStartBackend bool
51
52
52
53
viewport viewport.Model
53
54
scrollToBottom bool
@@ -93,6 +94,12 @@ func WithStatus(status *Status) ModelOption {
93
94
}
94
95
}
95
96
97
+ func WithAutoStartBackend (autoStartBackend bool ) ModelOption {
98
+ return func (m * model ) {
99
+ m .autoStartBackend = autoStartBackend
100
+ }
101
+ }
102
+
96
103
// TODO(manuel, 2024-04-07) Add options to configure filepicker
97
104
98
105
func InitialModel (manager geppetto_conversation.Manager , backend Backend , options ... ModelOption ) model {
@@ -151,9 +158,11 @@ func (m model) Init() tea.Cmd {
151
158
152
159
m .updateKeyBindings ()
153
160
154
- cmds = append (cmds , func () tea.Msg {
155
- return StartBackendMsg {}
156
- })
161
+ if m .autoStartBackend {
162
+ cmds = append (cmds , func () tea.Msg {
163
+ return StartBackendMsg {}
164
+ })
165
+ }
157
166
158
167
return tea .Batch (cmds ... )
159
168
}
You can’t perform that action at this time.
0 commit comments