Add reusable tools and assistant bindings

- Introduce a new `Tool` model and `AssistantToolBinding` for managing reusable tools within the application.
- Implement CRUD operations for tools in the new `tools` route, allowing for the creation, retrieval, updating, and deletion of tools.
- Update the `Assistant` model to include a list of tool IDs, enabling assistants to utilize these tools.
- Enhance the backend routes to synchronize tool bindings with assistants, ensuring proper management of tool associations.
- Add frontend components for tool management, including a tool picker in the assistant configuration, improving user experience in tool selection.
- Create a mobile call page to facilitate video calls, integrating camera and microphone selection for enhanced communication capabilities.
- Update API definitions to include tool-related types and operations, ensuring consistency across the application.
- Add a migration script to create the necessary database tables for tools and bindings, supporting the new functionality.
This commit is contained in:
Xin Wang
2026-07-10 10:05:41 +08:00
parent 919325505a
commit 3ed9e1b388
14 changed files with 1815 additions and 22 deletions

View File

@@ -11,6 +11,7 @@ export function AuthGate({ children }: { children: ReactNode }) {
const router = useRouter();
const { user, loading } = useAuth();
const isLoginPage = pathname === "/login";
const isCallPage = pathname.startsWith("/call/");
useEffect(() => {
if (!loading && !user && !isLoginPage) {
@@ -30,5 +31,10 @@ export function AuthGate({ children }: { children: ReactNode }) {
);
}
// 手机通话预览沿用登录态,但不显示管理台导航框架。
if (isCallPage) {
return <>{children}</>;
}
return <AppShell>{children}</AppShell>;
}