mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Add a new web client route for viewing all agents
This commit is contained in:
parent
352168d6c2
commit
6ab649312f
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@ from starlette.authentication import has_required_scope, requires
|
|||
|
||||
from khoj.database import adapters
|
||||
from khoj.database.adapters import (
|
||||
AgentAdapters,
|
||||
ConversationAdapters,
|
||||
EntryAdapters,
|
||||
get_user_github_config,
|
||||
|
@ -129,6 +130,11 @@ def login_page(request: Request):
|
|||
)
|
||||
|
||||
|
||||
@web_client.get("/agents", response_class=HTMLResponse)
|
||||
def agents_page(request: Request):
|
||||
agents = AgentAdapters.get_all_acessible_agents(request.user.object if request.user.is_authenticated else None)
|
||||
|
||||
|
||||
@web_client.get("/config", response_class=HTMLResponse)
|
||||
@requires(["authenticated"], redirect="login_page")
|
||||
def config_page(request: Request):
|
||||
|
|
Loading…
Add table
Reference in a new issue