Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions runtime/flybot-image/plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ export function apply(ctx, config = {}) {
const nativeTurn = (botId, savedSessionId, text, requestId, options = {}) => bridge.exclusive(async () => {
options.signal?.throwIfAborted()
const predecessor = options.steer?.native
const maySteer = options.personalTeamScope?.setupPending !== true
const live = predecessor?.botId === botId && predecessor.session.id === livePrivateChat(rt,botId,savedSessionId) &&
!options.personalTeamScope && predecessor.current()
maySteer && predecessor.current()
if (!live) await options.steer?.take()?.cancel()
const sessionId = live ? predecessor.session.id : await prepareMappedChat(botId, savedSessionId)
options.signal?.throwIfAborted()
Expand All @@ -155,8 +156,7 @@ export function apply(ctx, config = {}) {
bridge.requireModel(botId)
const turn = () => runTurn(rt, ctx, botId, text, requestId, undefined, parts, {
sessionId, onProgress: options.onProgress, onPhase: options.onPhase, signal: options.signal,
managedGroup: options.managedGroup, interactive: options.interactive, steer:options.steer,
maySteer:!options.personalTeamScope,
managedGroup: options.managedGroup, interactive: options.interactive, steer:options.steer, maySteer,
})
return options.personalTeamScope && rt.flybotWorkspaceTeam
? rt.flybotWorkspaceTeam.run({botId,sessionId,requestId,scope:options.personalTeamScope}, turn)
Expand Down
5 changes: 3 additions & 2 deletions runtime/flybot-image/test/container-gateway-isolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,9 @@ def api(token, method, path, payload=None, expected=200, timeout=20):
assert.equal(turns.filter(event => event.data.source?.kind==='flybot-workspace-history').length,1)
""", history['conversation']['native_session_id'])

steer_conversation = api(token_a, 'POST', conversations, {'title':'CI native steer'}, expected=201)['conversation']
steer_chat = f'{conversations}/{steer_conversation["id"]}'
personal_conversations = f'{agents}/{a["personal_agent_id"]}/conversations'
steer_conversation = api(token_a, 'POST', personal_conversations, {'title':'CI native steer'}, expected=201)['conversation']
steer_chat = f'{personal_conversations}/{steer_conversation["id"]}'
def send_steer(marker):
return api(token_a, 'POST', f'{steer_chat}/messages', {
'body':marker, 'accept_pending':True, 'interrupt_current':True,
Expand Down
Loading