Skip to content

feat(adk): turn loop support front and exit loop#796

Merged
meguminnnnnnnnn merged 1 commit intofeat/agent_turn_loopfrom
feat/wdz/front
Feb 21, 2026
Merged

feat(adk): turn loop support front and exit loop#796
meguminnnnnnnnn merged 1 commit intofeat/agent_turn_loopfrom
feat/wdz/front

Conversation

@meguminnnnnnnnn
Copy link
Copy Markdown
Contributor

What type of PR is this?

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

Comment thread adk/turn_loop.go
}, nil
}

var ErrLoopExit = errors.New("loop exit")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接采用 EOF error 这个语义,感觉就够了

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF 是 io.EOF,这里有不涉及读,感觉不好吧

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

咱们的 StreamReader 也是采用 io.EOF 作为结束标记的。 这里的 Receive/Front 感觉都是类似的

Copy link
Copy Markdown
Contributor Author

@meguminnnnnnnnn meguminnnnnnnnn Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是定义给用户的用的,用户不知道 queue eof 了会发生什么,得告诉他们是停止循环。 而且 on agent events 也要判断这个

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

自定义的是多了一点语义: 要停止 Loop。
先用这个 error 吧

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

单测没过

@meguminnnnnnnnn meguminnnnnnnnn merged commit de163c0 into feat/agent_turn_loop Feb 21, 2026
5 of 14 checks passed
@meguminnnnnnnnn meguminnnnnnnnn deleted the feat/wdz/front branch February 21, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants