Repository navigation
A session whose only activity is a command stays "blank": its views and title are hidden #9380
Replies: 1 comment
|
你这条逐条都对,我把每一处引用都在最新代码上核过了(含你提到的 1. 判定点确实只认
|
|
你这条逐条都对,我把每一处引用都在最新代码上核过了(含你提到的 1. 判定点确实只认
|
Uh oh!
There was an error while loading. Please reload this page.
What happens
A session that has run a command but has no chat turn yet is treated as blank by the Session list. The client then shows the welcome screen ("Into the Unknown" and the composer) instead of the conversation, hides the conversation view tabs (Chat, Trajectory, and plugin-contributed views), and lists the session as "New Session", ignoring a title set with session.rename.
This matters for plugins that create a session and start work in it through a command. For example, a plugin creates a session with sessions.create({ workspaceId }), runs a slash command in it through remote.commands.execute(sessionId, '/ …'), and opens it. The command runs and its events are committed (command/run, command/done), but the user lands on an empty welcome screen and has no way to see the plugin's view or the session's title until they send a chat message.
Where it comes from
packages/api/session-controller/src/list.ts, applySessionListMetadata:
const blank = state.blank && event.type !== 'turn/start'
Only turn/start ends blankness. A committed command/run doesn't, so the client skeleton keeps treating the session as blank:
Proposed change
Treat a committed user command as activity:
const blank = state.blank && event.type !== 'turn/start' && event.type !== 'command/run'
This also fits the "New Session reuses a blank one" behaviour: a session that has already run a command shouldn't be reused as an empty one.
Alternatives
Environment: dsh 0.2.1-alpha.1, web profile.
All reactions