Repository navigation
fix(social): face-to-face tile UI, message sync and simpler + menu (#124 #125 #126) #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Typing in a face-to-face room posts a human line to Bot Social (`FLYBOT-FACE-HUMAN`) and shows it on the other FlyBot instance. Send no longer goes through the local Bot prompt, so it does not bump turns or stay local-only. ([#124](https://github.com/ThinkFlowLab/FlyBot/issues/124)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Face-to-face waiting is a tile grid (avatar above name and owner) with Leave and Enter chat on one row. Leave after joining has ended still moves the room to Past rooms. Past rows are unique with Open only; live rows in Friends' Bots are click-to-open with Leave, not Open/Start/Leave stacked. Join copy uses the owner and Bot name. ([#125](https://github.com/ThinkFlowLab/FlyBot/issues/125)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| The sidebar + menu is a short list of actions (not a New chat composer). Add friend has one-click Copy invite link. Friends' Bots keeps the N to approve badge and shows holds in that chat with readable names, not raw bot ids. ([#126](https://github.com/ThinkFlowLab/FlyBot/issues/126)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ import { randomUUID } from 'node:crypto' | |
| import { createUserMessage } from '@deepseek-ai/dsh-llm' | ||
| import { questionReply } from './parts.js' | ||
| import { COLORS, EXTRA_COLORS, ROUTE } from './constants.js' | ||
| import { isFaceRoom } from './room-membership.js' | ||
| import { mentionSpans } from '../shared/mentions.js' | ||
|
|
||
| const LANGUAGES = { zh: 'Chinese (简体中文)', en: 'English' } | ||
|
|
||
|
|
@@ -356,7 +358,20 @@ export function install(rt) { | |
| const past = rt.pastOwners.get(body.sessionId) | ||
| const sessionId = rt.botOf(body.sessionId) ? rt.chatOf(body.sessionId) : past && past.roomId === undefined ? rt.chatOf(past.botId) : body.sessionId | ||
| const room = rt.roomOf(sessionId) | ||
| if (room && actor) { | ||
| if (room && isFaceRoom(room)) { | ||
| if (actor && rt.authzEnforced() && !rt.roomMemberOf(actor, room.id)) return fail('You are not a member of that room', 'bot/forbidden') | ||
| // Face rooms must not go through sessionController.prompt: that starts a local | ||
| // bot round (turns/steps) and never fans the line to the other FlyBot instance. | ||
| const line = await rt.postRoomMessage(room.id, { text, displayName: actor?.displayName }, actor) | ||
| const who = line?.who || actor?.displayName || 'You' | ||
| if (typeof rt.postToRoom === 'function') { | ||
| await rt.postToRoom(room, { id: 'face-notice', name: who }, `${who}: ${text}`, { quiet: true, notice: true }) | ||
| .catch(error => rt.warn?.('ds-bot: face-room line not shown locally: %s', error)) | ||
| } | ||
| const bots = (room.members ?? []).map(id => rt.botOf(id)).filter(bot => bot?.name) | ||
| const named = mentionSpans(text, bots).some(span => span.bot) | ||
| if (!named) return ok(true) | ||
|
Comment on lines
+372
to
+373
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a face-room owner sends Useful? React with 👍 / 👎. |
||
| } else if (room && actor) { | ||
| if (rt.authzEnforced() && !rt.roomMemberOf(actor, room.id)) return fail('You are not a member of that room', 'bot/forbidden') | ||
| await rt.postRoomMessage(room.id, { text, displayName: actor.displayName }, actor) | ||
| const agent = await rt.resolveAgent(sessionId) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the initial
mode === 'new'render,wantedis empty, somatchescontains every listed Bot. AlthoughmenuOnlyhides the recipient field/composer and adds a New chat action, the unconditional loop at lines 133-135 still appends the whole roster, meaning the sidebar + opens a potentially long recipient picker rather than the intended short action-only menu (and the new unbounded menu styling can run past the pane for large teams). Suppress Bot matches until New chat switchescomposeon.Useful? React with 👍 / 👎.