Migrate LLM client to OpenAI SDK and implement WebUI-specific fileID handling

This commit is contained in:
2026-03-10 17:54:50 +08:00
parent 49f6297631
commit 0e1a800646
23 changed files with 1162 additions and 8201 deletions

View File

@@ -207,6 +207,9 @@ func runMessageChannel(ctx context.Context, cfg config.Config, engine *agent.Orc
return wb.Run(
ctx,
func(ctx context.Context, msg webui.IncomingMessage) (string, error) {
if len(msg.FileIDs) > 0 {
return engine.HandleMessageWithFileIDs(ctx, msg.ChatID, msg.UserID, msg.Text, msg.FileIDs)
}
return engine.HandleMessage(ctx, msg.ChatID, msg.UserID, msg.Text)
},
func(ctx context.Context, chatID, userID string, files []llm.InputFile) ([]string, error) {