Skip to content

Commit 4aae84f

Browse files
committed
Merge branch 'master' into UIFixes
2 parents 7a94919 + 930f35d commit 4aae84f

File tree

6 files changed

+191
-28
lines changed

6 files changed

+191
-28
lines changed

addon/globalPlugins/openai/__init__.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,59 @@ def makeSettings(self, settingsSizer):
282282

283283
sHelper.addItem(imageSizer)
284284

285+
chatFeedback = _("Chat feedback")
286+
chatFeedbackSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=chatFeedback)
287+
chatFeedbackBox = chatFeedbackSizer.GetStaticBox()
288+
chatFeedbackGroup = gui.guiHelper.BoxSizerHelper(self, sizer=chatFeedbackSizer)
289+
290+
self.chatFeedback = {
291+
"sndTaskInProgress": chatFeedbackGroup.addItem(
292+
wx.CheckBox(
293+
chatFeedbackBox,
294+
# Translators: This is a setting to play a sound when a task is in progress.
295+
label=_("Play sound when a task is in progress")
296+
)
297+
),
298+
"sndResponseSent": chatFeedbackGroup.addItem(
299+
wx.CheckBox(
300+
chatFeedbackBox,
301+
# Translators: This is a setting to play a sound when a response is sent.
302+
label=_("Play sound when a response is sent")
303+
)
304+
),
305+
"sndResponsePending": chatFeedbackGroup.addItem(
306+
wx.CheckBox(
307+
chatFeedbackBox,
308+
# Translators: This is a setting to play a sound when a response is pending.
309+
label=_("Play sound when a response is pending")
310+
)
311+
),
312+
"sndResponseReceived": chatFeedbackGroup.addItem(
313+
wx.CheckBox(
314+
chatFeedbackBox,
315+
# Translators: This is a setting to play a sound when a response is received.
316+
label=_("Play sound when a response is received")
317+
)
318+
),
319+
"brailleAutoFocusHistory": chatFeedbackGroup.addItem(
320+
wx.CheckBox(
321+
chatFeedbackBox,
322+
# Translators: This is a setting to attach braille to the history if the focus is in the prompt field.
323+
label=_("Attach braille to the history if the focus is in the prompt field")
324+
)
325+
),
326+
"speechResponseReceived": chatFeedbackGroup.addItem(
327+
wx.CheckBox(
328+
chatFeedbackBox,
329+
label=_("Speak response when the focus is in the prompt field")
330+
)
331+
)
332+
}
333+
for key, item in self.chatFeedback.items():
334+
item.SetValue(conf["chatFeedback"][key])
335+
336+
sHelper.addItem(chatFeedbackSizer)
337+
285338
# Translators: This is the name of a group of settings
286339
whisperGroupLabel = _("Recording")
287340
whisperSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=whisperGroupLabel)
@@ -379,6 +432,10 @@ def onSave(self):
379432

380433

381434

435+
for key, item in self.chatFeedback.items():
436+
conf["chatFeedback"][key] = item.GetValue()
437+
438+
382439
class GlobalPlugin(globalPluginHandler.GlobalPlugin):
383440

384441
scriptCategory = "Open AI"

addon/globalPlugins/openai/configspec.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
"channels": "integer(min=1, max=2, default=1)",
4949
"dtype": "string(default=int16)"
5050
},
51+
"chatFeedback": {
52+
"sndResponsePending": "boolean(default=True)",
53+
"sndResponseReceived": "boolean(default=True)",
54+
"sndResponseSent": "boolean(default=True)",
55+
"sndTaskInProgress": "boolean(default=True)",
56+
"brailleAutoFocusHistory": "boolean(default=True)",
57+
"speechResponseReceived": "boolean(default=True)",
58+
},
5159
"renewClient": "boolean(default=False)",
5260
"debug": "boolean(default=False)"
5361
}

0 commit comments

Comments
 (0)