Skip to content
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

frontend: Fix assistants_web client imports #820

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented Oct 23, 2024

Removes unneeded default_agent router
Replaces CreateUser schema with correct generated one

AI Description

This PR makes several changes to the backend and frontend code related to agents and routers.

Backend Changes

  • src/backend/config/routers.py: The RouterName.DEFAULT_AGENT section has been removed.
  • src/backend/routers/agent.py: The default_agent_router has been removed.
  • src/backend/routers/chat.py: A line has been removed, likely related to the chat stream function.
  • src/backend/schemas/agent.py: The AgentTaskResponse class has been removed, and the from typing import statement has been modified to remove Any, Dict, Optional.
  • src/backend/services/agent.py: The TASK_TRACE_PREVIEW_LIMIT constant has been removed.
  • src/backend/main.py: The default_agent_router import and its usage in the create_app function have been removed.

Frontend Changes

  • src/interfaces/assistants_web/src/app/tasks/[agentId]/page.tsx: The entire file has been removed, which contained a React component for displaying agent tasks.
  • src/interfaces/assistants_web/src/cohere-client/client.ts: The createUser method has been updated to use a different request body type, and the getAgentTasks, getDefaultAgent, and createUser methods have been removed.
  • src/interfaces/assistants_web/src/cohere-client/generated/services.gen.ts: The HTTPException message has been updated to include the possibility of synthesis failure.
  • src/interfaces/assistants_web/src/hooks/use-agents.ts: The useAgentTasks and useDefaultAgent functions have been removed.
  • src/interfaces/assistants_web/src/hooks/use-session.ts: The createUser method's parameters have been modified to use a request body object.
  • src/interfaces/coral_web/src/cohere-client/client.ts: The getDefaultAgent method has been removed.
  • src/interfaces/coral_web/src/cohere-client/generated/services.gen.ts: The getDefaultAgentV1DefaultAgentGet method has been removed.
  • src/interfaces/coral_web/src/cohere-client/generated/types.gen.ts: The GetDefaultAgentV1DefaultAgentGetResponse type has been removed.
  • src/interfaces/coral_web/src/hooks/agents.ts: The useDefaultAgent function has been removed.

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.73%. Comparing base (2900eb0) to head (82ad4f1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #820      +/-   ##
==========================================
- Coverage   79.87%   79.73%   -0.15%     
==========================================
  Files         244      244              
  Lines       10436    10486      +50     
==========================================
+ Hits         8336     8361      +25     
- Misses       2100     2125      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tianjing-li tianjing-li changed the title wip do not merge frontend: Fix assistants_web client imports Oct 23, 2024
Copy link
Collaborator

@EugeneLightsOn EugeneLightsOn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@tianjing-li tianjing-li added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit 083b530 Oct 24, 2024
6 checks passed
@tianjing-li tianjing-li deleted the client-run-fix branch October 24, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants