Expand model tag support: add GLM-5.1, simplify Anthropic IDs, scan tags anywhere in message
- Flink update_bars debouncing - update_bars subscription idempotency bugfix - Price decimal correction bugfix of previous commit - Add GLM-5.1 model tag alongside renamed GLM-5 - Use short Anthropic model IDs (sonnet/haiku/opus) instead of full version strings - Allow @tags anywhere in message content, not just at start - Return hasOtherContent flag instead of trimmed rest string - Only trigger greeting stream when tag has no other content - Update workspace knowledge base references to platform/workspace and platform/shapes - Hierarchical knowledge base catalog - 151 Trading Strategies knowledge base articles - Shapes knowledge base article - MutateShapes tool instead of workspace patch
This commit is contained in:
@@ -191,8 +191,8 @@ const handleMessage = (data: WebSocketMessage) => {
|
||||
|
||||
const newMessages: any[] = [systemMsg]
|
||||
|
||||
// Re-add the user's first message (content after the @Tag)
|
||||
const userContent: string = pendingModelSwitchContent || data.rest || ''
|
||||
// Re-add the user's first message if there was content beyond the @Tag
|
||||
const userContent: string = (data.hasOtherContent && pendingModelSwitchContent) ? pendingModelSwitchContent : ''
|
||||
if (userContent) {
|
||||
const userMsgId = generateMessageId()
|
||||
lastSentMessageId = userMsgId
|
||||
@@ -494,9 +494,9 @@ const sendMessage = async (event: any) => {
|
||||
}
|
||||
|
||||
if (modelSwitchUser) {
|
||||
// Model switch: store content-after-tag for model_switched handler to re-insert.
|
||||
// Model switch: store full message content for model_switched handler to re-insert as user bubble.
|
||||
// Don't add a user message bubble now — model_switched will set up the full initial state.
|
||||
pendingModelSwitchContent = content.replace(`@${modelSwitchUser.username}`, '').trim()
|
||||
pendingModelSwitchContent = content
|
||||
wsManager.send(wsMessage)
|
||||
isAgentProcessing.value = true
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user