Skip to content

Commit 5e79f93

Browse files
committed
✨ AI Agent #17797
Signed-off-by: Daniel <845765@qq.com>
1 parent 5de2418 commit 5e79f93

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

app/src/assets/scss/business/_agentChat.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,12 @@
608608
flex: 1;
609609
min-height: 0;
610610
}
611+
612+
.b3-menu__label {
613+
overflow: hidden;
614+
text-overflow: ellipsis;
615+
white-space: nowrap;
616+
}
611617
}
612618

613619
.agent-session-popup__search {

kernel/agent/agent.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"time"
3232

3333
"github.com/88250/gulu"
34+
"github.com/siyuan-note/logging"
3435

3536
"github.com/sashabaranov/go-openai"
3637
"github.com/siyuan-note/filelock"
@@ -217,6 +218,7 @@ func AgentChat(ctx context.Context, client *openai.Client, model string, session
217218
defer close(ch)
218219
defer func() {
219220
if r := recover(); r != nil {
221+
logging.LogErrorf("agent chat panic: %v\n%s", r, logging.ShortStack())
220222
sendEvent(ch, AgentEvent{Type: "error", Error: fmt.Sprintf("internal error: %v", r)})
221223
}
222224
}()

0 commit comments

Comments
 (0)