Skip to content

Commit b76ca97

Browse files
committed
Rename to Single Round Dialog
1 parent c183d9f commit b76ca97

File tree

8 files changed

+35
-35
lines changed

8 files changed

+35
-35
lines changed

Core/Sources/ChatService/ChatService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public final class ChatService: ObservableObject {
184184
name: command.name
185185
)
186186
case .promptToCode: return nil
187-
case .oneTimeDialog: return nil
187+
case .singleRoundDialog: return nil
188188
}
189189
}()
190190

Core/Sources/ChatTab/ChatGPT/ChatPanel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ struct ChatContextMenu: View {
463463
switch $0.feature {
464464
case .chatWithSelection, .customChat: return true
465465
case .promptToCode: return false
466-
case .oneTimeDialog: return false
466+
case .singleRoundDialog: return false
467467
}
468468
},
469469
id: \.name

Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ struct CustomCommandView: View {
104104
Text("Custom Chat")
105105
case .promptToCode:
106106
Text("Prompt to Code")
107-
case .oneTimeDialog:
108-
Text("One-time Dialog")
107+
case .singleRoundDialog:
108+
Text("Single Round Dialog")
109109
}
110110
}
111111
.font(.caption)
@@ -157,7 +157,7 @@ struct CustomCommandView: View {
157157
158158
This command will overwrite the system prompt to let the bot behave differently.
159159
160-
# One-time Dialog
160+
# Single Round Dialog
161161
162162
This command allows you to send a message to a temporary chat without opening the chat panel.
163163

Core/Sources/HostApp/CustomCommandSettings/EditCustomCommand.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ struct EditCustomCommand: ReducerProtocol {
88
case sendMessage
99
case promptToCode
1010
case customChat
11-
case oneTimeDialog
11+
case singleRoundDialog
1212
}
1313

1414
struct State: Equatable {
@@ -20,7 +20,7 @@ struct EditCustomCommand: ReducerProtocol {
2020
var sendMessage = EditSendMessageCommand.State()
2121
var promptToCode = EditPromptToCodeCommand.State()
2222
var customChat = EditCustomChatCommand.State()
23-
var oneTimeDialog = EditOneTimeDialogCommand.State()
23+
var singleRoundDialog = EditSingleRoundDialogCommand.State()
2424

2525
init(_ command: CustomCommand?) {
2626
isNewCommand = command == nil
@@ -48,14 +48,14 @@ struct EditCustomCommand: ReducerProtocol {
4848
systemPrompt: systemPrompt ?? "",
4949
prompt: prompt ?? ""
5050
)
51-
case let .oneTimeDialog(
51+
case let .singleRoundDialog(
5252
systemPrompt,
5353
overwriteSystemPrompt,
5454
prompt,
5555
receiveReplyInNotification
5656
):
57-
commandType = .oneTimeDialog
58-
oneTimeDialog = .init(
57+
commandType = .singleRoundDialog
58+
singleRoundDialog = .init(
5959
systemPrompt: systemPrompt ?? "",
6060
overwriteSystemPrompt: overwriteSystemPrompt ?? false,
6161
prompt: prompt ?? "",
@@ -80,7 +80,7 @@ struct EditCustomCommand: ReducerProtocol {
8080
case sendMessage(EditSendMessageCommand.Action)
8181
case promptToCode(EditPromptToCodeCommand.Action)
8282
case customChat(EditCustomChatCommand.Action)
83-
case oneTimeDialog(EditOneTimeDialogCommand.Action)
83+
case singleRoundDialog(EditSingleRoundDialogCommand.Action)
8484
}
8585

8686
let settings: CustomCommandView.Settings
@@ -99,8 +99,8 @@ struct EditCustomCommand: ReducerProtocol {
9999
EditCustomChatCommand()
100100
}
101101

102-
Scope(state: \.oneTimeDialog, action: /Action.oneTimeDialog) {
103-
EditOneTimeDialogCommand()
102+
Scope(state: \.singleRoundDialog, action: /Action.singleRoundDialog) {
103+
EditSingleRoundDialogCommand()
104104
}
105105

106106
BindingReducer()
@@ -139,9 +139,9 @@ struct EditCustomCommand: ReducerProtocol {
139139
systemPrompt: state.systemPrompt,
140140
prompt: state.prompt
141141
)
142-
case .oneTimeDialog:
143-
let state = state.oneTimeDialog
144-
return .oneTimeDialog(
142+
case .singleRoundDialog:
143+
let state = state.singleRoundDialog
144+
return .singleRoundDialog(
145145
systemPrompt: state.systemPrompt,
146146
overwriteSystemPrompt: state.overwriteSystemPrompt,
147147
prompt: state.prompt,
@@ -179,7 +179,7 @@ struct EditCustomCommand: ReducerProtocol {
179179
return .none
180180
case .customChat:
181181
return .none
182-
case .oneTimeDialog:
182+
case .singleRoundDialog:
183183
return .none
184184
}
185185
}
@@ -241,7 +241,7 @@ struct EditCustomChatCommand: ReducerProtocol {
241241
}
242242
}
243243

244-
struct EditOneTimeDialogCommand: ReducerProtocol {
244+
struct EditSingleRoundDialogCommand: ReducerProtocol {
245245
struct State: Equatable {
246246
@BindingState var systemPrompt: String = ""
247247
@BindingState var overwriteSystemPrompt: Bool = false

Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ struct EditCustomCommandView: View {
4040
return "Prompt to Code"
4141
case .customChat:
4242
return "Custom Chat"
43-
case .oneTimeDialog:
44-
return "One-time Dialog"
43+
case .singleRoundDialog:
44+
return "Single Round Dialog"
4545
}
4646
}() as String).tag(commandType)
4747
}
@@ -76,11 +76,11 @@ struct EditCustomCommandView: View {
7676
action: EditCustomCommand.Action.customChat
7777
)
7878
)
79-
case .oneTimeDialog:
80-
EditOneTimeDialogCommandView(
79+
case .singleRoundDialog:
80+
EditSingleRoundDialogCommandView(
8181
store: store.scope(
82-
state: \.oneTimeDialog,
83-
action: EditCustomCommand.Action.oneTimeDialog
82+
state: \.singleRoundDialog,
83+
action: EditCustomCommand.Action.singleRoundDialog
8484
)
8585
)
8686
}
@@ -186,8 +186,8 @@ struct EditCustomChatCommandView: View {
186186
}
187187
}
188188

189-
struct EditOneTimeDialogCommandView: View {
190-
let store: StoreOf<EditOneTimeDialogCommand>
189+
struct EditSingleRoundDialogCommandView: View {
190+
let store: StoreOf<EditSingleRoundDialogCommand>
191191

192192
var body: some View {
193193
WithViewStore(store, observe: { $0 }) { viewStore in
@@ -252,11 +252,11 @@ struct EditCustomCommandView_Preview: PreviewProvider {
252252
}
253253
}
254254

255-
struct EditOneTimeDialogCommandView_Preview: PreviewProvider {
255+
struct EditSingleRoundDialogCommandView_Preview: PreviewProvider {
256256
static var previews: some View {
257-
EditOneTimeDialogCommandView(store: .init(
257+
EditSingleRoundDialogCommandView(store: .init(
258258
initialState: .init(),
259-
reducer: EditOneTimeDialogCommand()
259+
reducer: EditSingleRoundDialogCommand()
260260
))
261261
.frame(width: 800, height: 600)
262262
}

Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct PseudoCommandHandler {
9393
}
9494
switch command.feature {
9595
// editor content is not required.
96-
case .customChat, .chatWithSelection, .oneTimeDialog:
96+
case .customChat, .chatWithSelection, .singleRoundDialog:
9797
return .init(
9898
content: "",
9999
lines: [],

Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,13 @@ extension WindowBaseCommandHandler {
299299
generateDescription: generateDescription,
300300
name: command.name
301301
)
302-
case let .oneTimeDialog(
302+
case let .singleRoundDialog(
303303
systemPrompt,
304304
overwriteSystemPrompt,
305305
prompt,
306306
receiveReplyInNotification
307307
):
308-
try await executeOneTimeDialog(
308+
try await executeSingleRoundDialog(
309309
systemPrompt: systemPrompt,
310310
overwriteSystemPrompt: overwriteSystemPrompt ?? false,
311311
prompt: prompt ?? "",
@@ -390,7 +390,7 @@ extension WindowBaseCommandHandler {
390390
presenter.presentPromptToCode(fileURL: fileURL)
391391
}
392392

393-
func executeOneTimeDialog(
393+
func executeSingleRoundDialog(
394394
systemPrompt: String?,
395395
overwriteSystemPrompt: Bool,
396396
prompt: String,

Tool/Sources/Preferences/Types/CustomCommand.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public struct CustomCommand: Codable, Equatable {
2121
)
2222
/// Custom chat.
2323
case customChat(systemPrompt: String?, prompt: String?)
24-
/// One-time dialog.
25-
case oneTimeDialog(
24+
/// Single round dialog.
25+
case singleRoundDialog(
2626
systemPrompt: String?,
2727
overwriteSystemPrompt: Bool?,
2828
prompt: String?,

0 commit comments

Comments
 (0)