mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
chore: Clean up merge issues
This commit is contained in:
parent
eb6d561e12
commit
f70e06a283
1 changed files with 3 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue