A workspace conversation is never remembered, so /admin/bots always reopens the bot's own chat.
This commit is contained in:
@@ -9,8 +9,8 @@ import type { BunextPageServerFn } from "@moduletrace/bunext/types";
|
||||
* A bot's conversation inside a workspace: the bot works with the
|
||||
* workspace's context, computers and models. Only the coordinator and the
|
||||
* workspace's bots have one; anyone else goes back to the workspace
|
||||
* settings (managers) or their bots. Rendering it records the conversation
|
||||
* in the last-visited cookies, so `/admin/bots` opens it again.
|
||||
* settings (managers) or their bots. Rendering it records the bot in the
|
||||
* last-visited cookie, so `/admin/bots` opens its own chat again.
|
||||
*/
|
||||
export const server: BunextPageServerFn<PagePropsType> = async (params) => {
|
||||
const query: PageQueryObject = params.query;
|
||||
@@ -37,12 +37,11 @@ export const server: BunextPageServerFn<PagePropsType> = async (params) => {
|
||||
}
|
||||
|
||||
const bot_id = props.bot.id;
|
||||
const workspace_id = props.workspace?.id ?? query.workspace_id;
|
||||
|
||||
return {
|
||||
props,
|
||||
res_transform(res) {
|
||||
return withLastVisitedBotCookies({ req: params.req, res, bot_id, workspace_id });
|
||||
return withLastVisitedBotCookies({ req: params.req, res, bot_id });
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user