chore: Clean up merge issues

This commit is contained in:
Liang-Shih Lin 2025-07-05 17:58:41 +08:00
parent eb6d561e12
commit f70e06a283

View file

@ -1044,11 +1044,12 @@ func (a appModel) executeCustomCommandWithArgs(commandName, arguments string) (t
args = &arguments
}
var cmd tea.Cmd
result, err := a.app.CommandsClient.ExecuteCustomCommand(ctx, commandName, args)
if err == nil {
// Server execution successful
slog.Info("Custom command executed via server", "command", commandName)
cmd := a.app.SendChatMessage(context.Background(), result.ProcessedContent, []app.Attachment{})
a.app, cmd = a.app.SendChatMessage(context.Background(), result.ProcessedContent, []opencode.FilePartParam{})
return a, cmd
}
@ -1101,7 +1102,7 @@ func (a appModel) executeCustomCommandWithArgs(commandName, arguments string) (t
}
// Send the processed command content as a message to the LLM
cmd := a.app.SendChatMessage(context.Background(), processedContent, []app.Attachment{})
a.app, cmd = a.app.SendChatMessage(context.Background(), processedContent, []opencode.FilePartParam{})
return a, cmd
}
@ -1292,15 +1293,6 @@ func (a appModel) scanCommandsDirectory(baseDir, relativePath string) ([]CustomC
return commands, nil
}
func (a appModel) updateCompletions(msg tea.Msg) (tea.Model, tea.Cmd) {
currentInput := a.editor.Value()
if currentInput != "" {
provider := a.completionManager.GetProvider(currentInput)
a.completions.SetProvider(provider)
}
return a.completions.Update(msg)
}
func NewModel(app *app.App) tea.Model {
commandProvider := completions.NewCommandCompletionProvider(app)
fileProvider := completions.NewFileAndFolderContextGroup(app)