-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make most major changes for an updated chat UI #843
Make most major changes for an updated chat UI #843
Conversation
- Add non-functional UI elements for chat, references, feedback buttons, rename/share session, mic, attachment, websocket connection
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
10005301 | Triggered | Generic Password | bf4c2f2 | src/khoj/app/settings.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
… from URL manually. See vercel/next.js#64660 for limitations with static export / dynamic routes
To test locally,
Sample code for local testing in src/khoj/routers/web_client.py
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────┐
41: templates = Jinja2Templates([constants.web_directory, constants.next_js_director │
─────────────────────────────────────────────────────────────────────────────────────┘
@web_client.get("/", response_class=FileResponse)
@requires(["authenticated"], redirect="login_page")
def index(request: Request):
return templates.TemplateResponse(
"chat/index.html",
context={
"request": request,
},
)
user = request.user.object
user_picture = request.session.get("user", {}).get("picture")
has_documents = EntryAdapters.user_has_entries(user=user)
─────────────────────────────────┐
68: def index(request: Request): │
─────────────────────────────────┘
@web_client.post("/", response_class=FileResponse)
@requires(["authenticated"], redirect="login_page")
def index_post(request: Request):
return templates.TemplateResponse(
"chat/index.html",
context={
"request": request,
},
)
user = request.user.object
user_picture = request.session.get("user", {}).get("picture")
has_documents = EntryAdapters.user_has_entries(user=user)
────────────────────────────────────────┐
115: def search_page(request: Request): │
────────────────────────────────────────┘
@web_client.get("/chat", response_class=FileResponse)
@requires(["authenticated"], redirect="login_page")
def chat_page(request: Request):
return templates.TemplateResponse(
"chat/index.html",
context={
"request": request,
},
)
user = request.user.object
user_picture = request.session.get("user", {}).get("picture")
has_documents = EntryAdapters.user_has_entries(user=user)
─────────────────────────────────────────────────┐
415: def computer_config_page(request: Request): │
─────────────────────────────────────────────────┘
@web_client.get("/share/chat/{public_conversation_slug}", response_class=HTMLResponse)
def view_public_conversation(request: Request):
return templates.TemplateResponse(
"share/chat/index.html",
context={
"request": request,
},
)
public_conversation_slug = request.path_params.get("public_conversation_slug")
public_conversation = PublicConversationAdapters.get_public_conversation_by_slug(public_conversation_slug)
if not public_conversation: |
The speaker icon (to talk back) is still non-functional. Mic is still non-functional.