Let crew managers edit a bot's workspace instructions where they work with it
A bot's instructions and memory for one workspace were only reachable
from the workspace's settings. The editor is now shared and also opens
from the conversation menu in that workspace ("Instructions here",
loaded on open through api/admin/workspaces/workspace-bot) and from the
workspace rows on the bot's settings page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import fetchApi from "@moduletrace/twui/utils/fetch/fetchApi";
|
||||
import type { APIResponseObject } from "@moduletrace/bunext/types";
|
||||
import type { WorkspaceBotRequest } from "@/src/schemas/workspace-schema";
|
||||
import type { WorkspaceBotInstructions } from "@/src/types";
|
||||
|
||||
/**
|
||||
* A bot's instructions and memory for one workspace, for its editor.
|
||||
*/
|
||||
export default async function fetchWorkspaceBotInstructions({ workspace_id, bot_id }: WorkspaceBotRequest) {
|
||||
return await fetchApi<WorkspaceBotRequest, APIResponseObject<WorkspaceBotInstructions>>(
|
||||
`/api/admin/workspaces/workspace-bot`,
|
||||
{ method: "POST", body: { workspace_id, bot_id } },
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user