Trim page props and page the conversation's messages
Bot and workspace lists in page props leave out instructions, memory and workspace context, and carry the last message as a short preview. The header avatar's edit form loads the bot's instructions when it opens. The conversation renders its latest 30 messages and loads older ones as the thread scrolls to its top. Also: the composer shows a placeholder until its editor loads, and `bun start` no longer builds first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -6,6 +6,8 @@ import grabWorkspaceComputers from "@/src/functions/backend/db/workspaces/grab-w
|
||||
import { AdminHomePath } from "@/src/dict/admin-sections-dict";
|
||||
import type { PagePropsType, PageQueryObject } from "@/src/types";
|
||||
import type { BunextPageServerFn } from "@moduletrace/bunext/types";
|
||||
import railBots from "@/src/utils/rail-bots";
|
||||
import railWorkspaces from "@/src/utils/rail-workspaces";
|
||||
|
||||
/**
|
||||
* A workspace's dashboard: its picture, context, latest activity, bots and
|
||||
@@ -38,12 +40,14 @@ export const server: BunextPageServerFn<PagePropsType> = async (params) => {
|
||||
grabWorkspaceActivity({ user_id: user.id, workspace_id }),
|
||||
]);
|
||||
|
||||
const crew = railBots({ bots: workspace_bots });
|
||||
|
||||
return {
|
||||
props: {
|
||||
workspaces,
|
||||
workspaces: railWorkspaces({ workspaces }),
|
||||
workspace,
|
||||
bots: workspace_bots,
|
||||
workspace_bots,
|
||||
bots: crew,
|
||||
workspace_bots: crew,
|
||||
workspace_computers,
|
||||
workspace_activity,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user