khoj 2.0.0b8.dev3__py3-none-any.whl → 2.0.0b9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- khoj/database/adapters/__init__.py +3 -2
- khoj/database/models/__init__.py +28 -0
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/{2327-ea623ca2d22f78e9.js → 2327-d863b0b21ecb23de.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/5477-c4209b72942d3038.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{5639-09e2009a2adedf8b.js → 5639-0c4604668cb2d4c0.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/9139-8ac4d9feb10f8869.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-e3d72f0edda6aa0c.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-0006674668eb5a4d.js → page-9a4610474cd59a71.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-4c465cde2d14cb52.js → page-f7bb9d777b7745d4.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/chat/page-a8455b8f9d36a2b0.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/{page-85b9b416898738f7.js → page-2025944ec1f80144.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/layout-4505b79deb734a30.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/search/{page-883b7d8d2e3abe3e.js → page-4885df3cd175c957.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-95e994ddac31473f.js → page-8be3b35178abf2ec.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6fb51c5c80f8ec67.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-c062269e6906ef22.js → page-ee8ef5270163e7f2.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-c375c47fee5a4dda.js → webpack-6355be48bba04af8.js} +1 -1
- khoj/interface/compiled/_next/static/css/102b97d6472fdd3a.css +1 -0
- khoj/interface/compiled/_next/static/css/37a73b87f02df402.css +1 -0
- khoj/interface/compiled/_next/static/css/c34713c98384ee87.css +1 -0
- khoj/interface/compiled/_next/static/css/fc82e43baa9ae218.css +1 -0
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +3 -3
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +4 -4
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/main.py +11 -1
- khoj/processor/conversation/utils.py +6 -6
- khoj/processor/operator/__init__.py +16 -1
- khoj/routers/api_chat.py +846 -682
- khoj/routers/helpers.py +149 -5
- khoj/routers/research.py +26 -1
- khoj/utils/rawconfig.py +0 -1
- {khoj-2.0.0b8.dev3.dist-info → khoj-2.0.0b9.dist-info}/METADATA +1 -1
- {khoj-2.0.0b8.dev3.dist-info → khoj-2.0.0b9.dist-info}/RECORD +57 -57
- khoj/interface/compiled/_next/static/chunks/5477-18323501c445315e.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9568-0d60ac475f4cc538.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-e49165209d2e406c.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-d5ae861e1ade9d08.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-b371304895e54627.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-64a53f8ec4afa6b3.js +0 -1
- khoj/interface/compiled/_next/static/css/76c658ee459140a9.css +0 -1
- khoj/interface/compiled/_next/static/css/a0c2fd63bb396f04.css +0 -1
- khoj/interface/compiled/_next/static/css/ee66643a6a5bf71c.css +0 -1
- khoj/interface/compiled/_next/static/css/fbacbdfd5e7f3f0e.css +0 -1
- /khoj/interface/compiled/_next/static/{RrD-yExRLXeXG-f3lGWYq → 6kC_Tt4g0U2gXGUbnSB1O}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{RrD-yExRLXeXG-f3lGWYq → 6kC_Tt4g0U2gXGUbnSB1O}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/chunks/{1327-3b1a41af530fa8ee.js → 1327-1a9107b9a2a04a98.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{1915-fbfe167c84ad60c5.js → 1915-5c6508f6ebb62a30.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2117-e78b6902ad6f75ec.js → 2117-080746c8e170c81a.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2939-4d4084c5b888b960.js → 2939-4af3fd24b8ffc9ad.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{4447-d6cf93724d57e34b.js → 4447-cd95608f8e93e711.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-4b7790573b08c50d.js → 8667-50b03a89e82e0ba7.js} +0 -0
- {khoj-2.0.0b8.dev3.dist-info → khoj-2.0.0b9.dist-info}/WHEEL +0 -0
- {khoj-2.0.0b8.dev3.dist-info → khoj-2.0.0b9.dist-info}/entry_points.txt +0 -0
- {khoj-2.0.0b8.dev3.dist-info → khoj-2.0.0b9.dist-info}/licenses/LICENSE +0 -0
khoj/routers/helpers.py
CHANGED
@@ -33,7 +33,7 @@ from apscheduler.job import Job
|
|
33
33
|
from apscheduler.triggers.cron import CronTrigger
|
34
34
|
from asgiref.sync import sync_to_async
|
35
35
|
from django.utils import timezone as django_timezone
|
36
|
-
from fastapi import Depends, Header, HTTPException, Request, UploadFile
|
36
|
+
from fastapi import Depends, Header, HTTPException, Request, UploadFile, WebSocket
|
37
37
|
from pydantic import BaseModel, EmailStr, Field
|
38
38
|
from starlette.authentication import has_required_scope
|
39
39
|
from starlette.requests import URL
|
@@ -1909,7 +1909,7 @@ class ApiUserRateLimiter:
|
|
1909
1909
|
# Check if the user has exceeded the rate limit
|
1910
1910
|
if subscribed and count_requests >= self.subscribed_requests:
|
1911
1911
|
logger.info(
|
1912
|
-
f"Rate limit: {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for subscribed user: {user}."
|
1912
|
+
f"Rate limit ({self.slug}): {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for subscribed user: {user}."
|
1913
1913
|
)
|
1914
1914
|
raise HTTPException(
|
1915
1915
|
status_code=429,
|
@@ -1918,7 +1918,7 @@ class ApiUserRateLimiter:
|
|
1918
1918
|
if not subscribed and count_requests >= self.requests:
|
1919
1919
|
if self.requests >= self.subscribed_requests:
|
1920
1920
|
logger.info(
|
1921
|
-
f"Rate limit: {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for user: {user}."
|
1921
|
+
f"Rate limit ({self.slug}): {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for user: {user}."
|
1922
1922
|
)
|
1923
1923
|
raise HTTPException(
|
1924
1924
|
status_code=429,
|
@@ -1926,7 +1926,7 @@ class ApiUserRateLimiter:
|
|
1926
1926
|
)
|
1927
1927
|
|
1928
1928
|
logger.info(
|
1929
|
-
f"Rate limit: {count_requests}/{self.requests} requests not allowed in {self.window} seconds for user: {user}."
|
1929
|
+
f"Rate limit ({self.slug}): {count_requests}/{self.requests} requests not allowed in {self.window} seconds for user: {user}."
|
1930
1930
|
)
|
1931
1931
|
raise HTTPException(
|
1932
1932
|
status_code=429,
|
@@ -1936,6 +1936,56 @@ class ApiUserRateLimiter:
|
|
1936
1936
|
# Add the current request to the cache
|
1937
1937
|
UserRequests.objects.create(user=user, slug=self.slug)
|
1938
1938
|
|
1939
|
+
def check_websocket(self, websocket: WebSocket):
|
1940
|
+
"""WebSocket-specific rate limiting method"""
|
1941
|
+
# Rate limiting disabled if billing is disabled
|
1942
|
+
if state.billing_enabled is False:
|
1943
|
+
return
|
1944
|
+
|
1945
|
+
# Rate limiting is disabled if user unauthenticated.
|
1946
|
+
if not websocket.scope.get("user") or not websocket.scope["user"].is_authenticated:
|
1947
|
+
return
|
1948
|
+
|
1949
|
+
user: KhojUser = websocket.scope["user"].object
|
1950
|
+
subscribed = has_required_scope(websocket, ["premium"])
|
1951
|
+
current_window = "today" if self.window == 60 * 60 * 24 else f"now"
|
1952
|
+
next_window = "tomorrow" if self.window == 60 * 60 * 24 else f"in a bit"
|
1953
|
+
common_message_prefix = f"I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for {current_window}."
|
1954
|
+
|
1955
|
+
# Remove requests outside of the time window
|
1956
|
+
cutoff = django_timezone.now() - timedelta(seconds=self.window)
|
1957
|
+
count_requests = UserRequests.objects.filter(user=user, created_at__gte=cutoff, slug=self.slug).count()
|
1958
|
+
|
1959
|
+
# Check if the user has exceeded the rate limit
|
1960
|
+
if subscribed and count_requests >= self.subscribed_requests:
|
1961
|
+
logger.info(
|
1962
|
+
f"Rate limit ({self.slug}): {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for subscribed user: {user}."
|
1963
|
+
)
|
1964
|
+
raise HTTPException(
|
1965
|
+
status_code=429,
|
1966
|
+
detail=f"{common_message_prefix} But let's chat more {next_window}?",
|
1967
|
+
)
|
1968
|
+
if not subscribed and count_requests >= self.requests:
|
1969
|
+
if self.requests >= self.subscribed_requests:
|
1970
|
+
logger.info(
|
1971
|
+
f"Rate limit ({self.slug}): {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for user: {user}."
|
1972
|
+
)
|
1973
|
+
raise HTTPException(
|
1974
|
+
status_code=429,
|
1975
|
+
detail=f"{common_message_prefix} But let's chat more {next_window}?",
|
1976
|
+
)
|
1977
|
+
|
1978
|
+
logger.info(
|
1979
|
+
f"Rate limit ({self.slug}): {count_requests}/{self.requests} requests not allowed in {self.window} seconds for user: {user}."
|
1980
|
+
)
|
1981
|
+
raise HTTPException(
|
1982
|
+
status_code=429,
|
1983
|
+
detail=f"{common_message_prefix} You can subscribe to increase your usage limit via [your settings](https://app.khoj.dev/settings) or we can continue our conversation {next_window}.",
|
1984
|
+
)
|
1985
|
+
|
1986
|
+
# Add the current request to the cache
|
1987
|
+
UserRequests.objects.create(user=user, slug=self.slug)
|
1988
|
+
|
1939
1989
|
|
1940
1990
|
class ApiImageRateLimiter:
|
1941
1991
|
def __init__(self, max_images: int = 10, max_combined_size_mb: float = 10):
|
@@ -1983,6 +2033,89 @@ class ApiImageRateLimiter:
|
|
1983
2033
|
detail=f"Those images are way too large for me! I can handle up to {self.max_combined_size_mb}MB of images per message.",
|
1984
2034
|
)
|
1985
2035
|
|
2036
|
+
def check_websocket(self, websocket: WebSocket, body: ChatRequestBody):
|
2037
|
+
"""WebSocket-specific image rate limiting method"""
|
2038
|
+
if state.billing_enabled is False:
|
2039
|
+
return
|
2040
|
+
|
2041
|
+
# Rate limiting is disabled if user unauthenticated.
|
2042
|
+
if not websocket.scope.get("user") or not websocket.scope["user"].is_authenticated:
|
2043
|
+
return
|
2044
|
+
|
2045
|
+
if not body.images:
|
2046
|
+
return
|
2047
|
+
|
2048
|
+
# Check number of images
|
2049
|
+
if len(body.images) > self.max_images:
|
2050
|
+
logger.info(f"Rate limit: {len(body.images)}/{self.max_images} images not allowed per message.")
|
2051
|
+
raise HTTPException(
|
2052
|
+
status_code=429,
|
2053
|
+
detail=f"Those are way too many images for me! I can handle up to {self.max_images} images per message.",
|
2054
|
+
)
|
2055
|
+
|
2056
|
+
# Check total size of images
|
2057
|
+
total_size_mb = 0.0
|
2058
|
+
for image in body.images:
|
2059
|
+
# Unquote the image in case it's URL encoded
|
2060
|
+
image = unquote(image)
|
2061
|
+
# Assuming the image is a base64 encoded string
|
2062
|
+
# Remove the data:image/jpeg;base64, part if present
|
2063
|
+
if "," in image:
|
2064
|
+
image = image.split(",", 1)[1]
|
2065
|
+
|
2066
|
+
# Decode base64 to get the actual size
|
2067
|
+
image_bytes = base64.b64decode(image)
|
2068
|
+
total_size_mb += len(image_bytes) / (1024 * 1024) # Convert bytes to MB
|
2069
|
+
|
2070
|
+
if total_size_mb > self.max_combined_size_mb:
|
2071
|
+
logger.info(f"Data limit: {total_size_mb}MB/{self.max_combined_size_mb}MB size not allowed per message.")
|
2072
|
+
raise HTTPException(
|
2073
|
+
status_code=429,
|
2074
|
+
detail=f"Those images are way too large for me! I can handle up to {self.max_combined_size_mb}MB of images per message.",
|
2075
|
+
)
|
2076
|
+
|
2077
|
+
|
2078
|
+
class WebSocketConnectionManager:
|
2079
|
+
"""Limit max open websockets per user."""
|
2080
|
+
|
2081
|
+
def __init__(self, trial_user_max_connections: int = 10, subscribed_user_max_connections: int = 10):
|
2082
|
+
self.trial_user_max_connections = trial_user_max_connections
|
2083
|
+
self.subscribed_user_max_connections = subscribed_user_max_connections
|
2084
|
+
self.connection_slug_prefix = "ws_connection_"
|
2085
|
+
# Set cleanup window to 24 hours for truly stale connections (e.g., server crashes)
|
2086
|
+
self.cleanup_window = 86400 # 24 hours
|
2087
|
+
|
2088
|
+
async def can_connect(self, websocket: WebSocket) -> bool:
|
2089
|
+
"""Check if user can establish a new WebSocket connection."""
|
2090
|
+
# Cleanup very old connections (likely from server crashes)
|
2091
|
+
user: KhojUser = websocket.scope["user"].object
|
2092
|
+
subscribed = has_required_scope(websocket, ["premium"])
|
2093
|
+
max_connections = self.subscribed_user_max_connections if subscribed else self.trial_user_max_connections
|
2094
|
+
|
2095
|
+
await self._cleanup_stale_connections(user)
|
2096
|
+
|
2097
|
+
# Count ALL connections for this user (not filtered by time)
|
2098
|
+
active_connections = await UserRequests.objects.filter(
|
2099
|
+
user=user, slug__startswith=self.connection_slug_prefix
|
2100
|
+
).acount()
|
2101
|
+
|
2102
|
+
return active_connections < max_connections
|
2103
|
+
|
2104
|
+
async def register_connection(self, user: KhojUser, connection_id: str) -> None:
|
2105
|
+
"""Register a new WebSocket connection."""
|
2106
|
+
await UserRequests.objects.acreate(user=user, slug=f"{self.connection_slug_prefix}{connection_id}")
|
2107
|
+
|
2108
|
+
async def unregister_connection(self, user: KhojUser, connection_id: str) -> None:
|
2109
|
+
"""Remove a WebSocket connection record."""
|
2110
|
+
await UserRequests.objects.filter(user=user, slug=f"{self.connection_slug_prefix}{connection_id}").adelete()
|
2111
|
+
|
2112
|
+
async def _cleanup_stale_connections(self, user: KhojUser) -> None:
|
2113
|
+
"""Remove connection records older than cleanup window."""
|
2114
|
+
cutoff = django_timezone.now() - timedelta(seconds=self.cleanup_window)
|
2115
|
+
await UserRequests.objects.filter(
|
2116
|
+
user=user, slug__startswith=self.connection_slug_prefix, created_at__lt=cutoff
|
2117
|
+
).adelete()
|
2118
|
+
|
1986
2119
|
|
1987
2120
|
class ConversationCommandRateLimiter:
|
1988
2121
|
def __init__(self, trial_rate_limit: int, subscribed_rate_limit: int, slug: str):
|
@@ -1991,7 +2124,7 @@ class ConversationCommandRateLimiter:
|
|
1991
2124
|
self.subscribed_rate_limit = subscribed_rate_limit
|
1992
2125
|
self.restricted_commands = [ConversationCommand.Research]
|
1993
2126
|
|
1994
|
-
async def update_and_check_if_valid(self, request: Request, conversation_command: ConversationCommand):
|
2127
|
+
async def update_and_check_if_valid(self, request: Request | WebSocket, conversation_command: ConversationCommand):
|
1995
2128
|
if state.billing_enabled is False:
|
1996
2129
|
return
|
1997
2130
|
|
@@ -2512,6 +2645,17 @@ async def read_chat_stream(response_iterator: AsyncGenerator[str, None]) -> Dict
|
|
2512
2645
|
}
|
2513
2646
|
|
2514
2647
|
|
2648
|
+
def get_message_from_queue(queue: asyncio.Queue) -> Optional[str]:
|
2649
|
+
"""Get any message in queue if available."""
|
2650
|
+
if not queue:
|
2651
|
+
return None
|
2652
|
+
try:
|
2653
|
+
# Non-blocking check for message in the queue
|
2654
|
+
return queue.get_nowait()
|
2655
|
+
except asyncio.QueueEmpty:
|
2656
|
+
return None
|
2657
|
+
|
2658
|
+
|
2515
2659
|
def get_user_config(user: KhojUser, request: Request, is_detailed: bool = False):
|
2516
2660
|
user_picture = request.session.get("user", {}).get("picture")
|
2517
2661
|
is_active = has_required_scope(request, ["premium"])
|
khoj/routers/research.py
CHANGED
@@ -15,6 +15,7 @@ from khoj.processor.conversation.utils import (
|
|
15
15
|
ResearchIteration,
|
16
16
|
ToolCall,
|
17
17
|
construct_iteration_history,
|
18
|
+
construct_structured_message,
|
18
19
|
construct_tool_chat_history,
|
19
20
|
load_complex_json,
|
20
21
|
)
|
@@ -24,6 +25,7 @@ from khoj.processor.tools.run_code import run_code
|
|
24
25
|
from khoj.routers.helpers import (
|
25
26
|
ChatEvent,
|
26
27
|
generate_summary_from_files,
|
28
|
+
get_message_from_queue,
|
27
29
|
grep_files,
|
28
30
|
list_files,
|
29
31
|
search_documents,
|
@@ -74,7 +76,7 @@ async def apick_next_tool(
|
|
74
76
|
):
|
75
77
|
previous_iteration = previous_iterations[-1]
|
76
78
|
yield ResearchIteration(
|
77
|
-
query=query,
|
79
|
+
query=ToolCall(name=previous_iteration.query.name, args={"query": query}, id=previous_iteration.query.id), # type: ignore
|
78
80
|
context=previous_iteration.context,
|
79
81
|
onlineContext=previous_iteration.onlineContext,
|
80
82
|
codeContext=previous_iteration.codeContext,
|
@@ -221,6 +223,8 @@ async def research(
|
|
221
223
|
tracer: dict = {},
|
222
224
|
query_files: str = None,
|
223
225
|
cancellation_event: Optional[asyncio.Event] = None,
|
226
|
+
interrupt_queue: Optional[asyncio.Queue] = None,
|
227
|
+
abort_message: str = "␃🔚␗",
|
224
228
|
):
|
225
229
|
max_document_searches = 7
|
226
230
|
max_online_searches = 3
|
@@ -241,6 +245,26 @@ async def research(
|
|
241
245
|
logger.debug(f"Research cancelled. User {user} disconnected client.")
|
242
246
|
break
|
243
247
|
|
248
|
+
# Update the query for the current research iteration
|
249
|
+
if interrupt_query := get_message_from_queue(interrupt_queue):
|
250
|
+
if interrupt_query == abort_message:
|
251
|
+
cancellation_event.set()
|
252
|
+
logger.debug(f"Research cancelled by user {user} via interrupt queue.")
|
253
|
+
break
|
254
|
+
# Add the interrupt query as a new user message to the research conversation history
|
255
|
+
logger.info(
|
256
|
+
f"Continuing research for user {user} with the previous {len(previous_iterations)} iterations and new instruction: {interrupt_query}"
|
257
|
+
)
|
258
|
+
previous_iterations_history = construct_iteration_history(
|
259
|
+
previous_iterations, query, query_images, query_files
|
260
|
+
)
|
261
|
+
research_conversation_history += previous_iterations_history
|
262
|
+
query = interrupt_query
|
263
|
+
previous_iterations = []
|
264
|
+
|
265
|
+
async for result in send_status_func(f"**Incorporate New Instruction**: {interrupt_query}"):
|
266
|
+
yield result
|
267
|
+
|
244
268
|
online_results: Dict = dict()
|
245
269
|
code_results: Dict = dict()
|
246
270
|
document_results: List[Dict[str, str]] = []
|
@@ -428,6 +452,7 @@ async def research(
|
|
428
452
|
agent=agent,
|
429
453
|
query_files=query_files,
|
430
454
|
cancellation_event=cancellation_event,
|
455
|
+
interrupt_queue=interrupt_queue,
|
431
456
|
tracer=tracer,
|
432
457
|
):
|
433
458
|
if isinstance(result, dict) and ChatEvent.STATUS in result:
|
khoj/utils/rawconfig.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
khoj/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
khoj/configure.py,sha256=Z3c3cE4-pqZ5eqGA8lRqcpNlDRby4cjtcFYVD2RD4i8,18994
|
3
|
-
khoj/main.py,sha256=
|
3
|
+
khoj/main.py,sha256=1Ev5jWhfZRr1rOXtUMaCSmzt-dp_VIOIcYXT9aAzTA8,8855
|
4
4
|
khoj/manage.py,sha256=njo6uLxGaMamTPesHjFEOIBJbpIUrz39e1V59zKj544,664
|
5
5
|
khoj/app/README.md,sha256=PSQjKCdpU2hgszLVF8yEhV7TWhbEEb-1aYLTRuuAsKI,2832
|
6
6
|
khoj/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -11,7 +11,7 @@ khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
khoj/database/admin.py,sha256=CfIAnwxV_HfbnhyjVqk9wtrz8hHnStFu-7ap82x6lYU,13256
|
12
12
|
khoj/database/apps.py,sha256=pM4tkX5Odw4YW_hLLKK8Nd5kqGddf1en0oMCea44RZw,153
|
13
13
|
khoj/database/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
14
|
-
khoj/database/adapters/__init__.py,sha256=
|
14
|
+
khoj/database/adapters/__init__.py,sha256=vayHgJl5Lj403gVs6YS4nMPK_X6hOimM6YN9qkTmiXM,83112
|
15
15
|
khoj/database/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
khoj/database/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
khoj/database/management/commands/change_default_model.py,sha256=6QXJttG58gpU7vZApQEeEPVNAuhjU2xa6_BwJsfz320,4877
|
@@ -124,42 +124,42 @@ khoj/database/migrations/0089_chatmodel_price_tier_and_more.py,sha256=EJ1Yf6MMzh
|
|
124
124
|
khoj/database/migrations/0090_alter_khojuser_uuid.py,sha256=2h9v-DiuqFuZKpAyWYwueqZkBHvxZbm-_guRjNaZzxg,3802
|
125
125
|
khoj/database/migrations/0091_chatmodel_friendly_name_and_more.py,sha256=e-2DQhyW9kMxMg7ItGSyCKE5GQFI0ZSuyfD8CdfVa0k,1758
|
126
126
|
khoj/database/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
127
|
-
khoj/database/models/__init__.py,sha256=
|
127
|
+
khoj/database/models/__init__.py,sha256=GPdyWFq8YoHsjj-GJaR4QPvh7W9E2lWrJQe8YpXJyPk,33145
|
128
128
|
khoj/interface/compiled/agents.svg,sha256=yFCRwIM-Qawa0C5ggAo3ekb-Q1ElmotBOKIGhtfIQqM,1722
|
129
129
|
khoj/interface/compiled/automation.svg,sha256=o7L2XYwJWRSMvl8h6TBv6Pt28RTRVMHqF04EPY0AFj0,1467
|
130
130
|
khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvtM3A,2424
|
131
131
|
khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
|
132
132
|
khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
|
133
133
|
khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
|
134
|
-
khoj/interface/compiled/index.html,sha256=
|
135
|
-
khoj/interface/compiled/index.txt,sha256=
|
134
|
+
khoj/interface/compiled/index.html,sha256=6_XfFD9sw5dSpTIQT4cFYMW6QYA26SGezFVid8EtSG0,53350
|
135
|
+
khoj/interface/compiled/index.txt,sha256=JfZEhsKLM9weJjVPAL1PJLEPx4STLVILPMp0We5mtPc,7747
|
136
136
|
khoj/interface/compiled/khoj.webmanifest,sha256=9wOK2BMS6xH5NKd2eaUgTLg9WepIxB2K2U33KU89LD8,2543
|
137
137
|
khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
|
138
138
|
khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
|
139
139
|
khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
|
140
140
|
khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
|
141
141
|
khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
|
142
|
-
khoj/interface/compiled/404/index.html,sha256=
|
143
|
-
khoj/interface/compiled/_next/static/
|
144
|
-
khoj/interface/compiled/_next/static/
|
142
|
+
khoj/interface/compiled/404/index.html,sha256=gjyvNd1A8m72WfnmLePLXApbN_zv44Kvnu5n76pjKMc,17407
|
143
|
+
khoj/interface/compiled/_next/static/6kC_Tt4g0U2gXGUbnSB1O/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
|
144
|
+
khoj/interface/compiled/_next/static/6kC_Tt4g0U2gXGUbnSB1O/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
145
145
|
khoj/interface/compiled/_next/static/chunks/1191.b547ec13349b4aed.js,sha256=3qtdOft2SSaGT0qhyPunEraJEZUxIqDV4q3ULnFantg,10913
|
146
|
-
khoj/interface/compiled/_next/static/chunks/1327-
|
146
|
+
khoj/interface/compiled/_next/static/chunks/1327-1a9107b9a2a04a98.js,sha256=7NmSOycXRGHpTN98sMAirnWN8ZUL971FsQpWmOs4Fxs,442974
|
147
147
|
khoj/interface/compiled/_next/static/chunks/1588.f0558a0bdffc4761.js,sha256=ZSpLe7ui7FG7AvK00JHPg1YjYz8R9l1Obzu1mYHpzjo,89845
|
148
|
-
khoj/interface/compiled/_next/static/chunks/1915-
|
148
|
+
khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js,sha256=qP_naVeN_Vqu4o2bOYGBoDEYCFVDphWwLqa_3_WeYjU,11294
|
149
149
|
khoj/interface/compiled/_next/static/chunks/1918.925cb4a35518d258.js,sha256=WWqQcBDm9KEZUpj0P9p-iiVxoVjnM4PGtAyQXGAZ4yo,6088
|
150
|
-
khoj/interface/compiled/_next/static/chunks/2117-
|
150
|
+
khoj/interface/compiled/_next/static/chunks/2117-080746c8e170c81a.js,sha256=yOBtQrL5NRMjI60r4pmZRRTHZv8_xwZm4DQp-RI8H9M,123994
|
151
151
|
khoj/interface/compiled/_next/static/chunks/2242.9a07e19f1a3a8b16.js,sha256=gE2wenv7eMCWo8FlC8uOffniVrbcSyi2BfpoDygPJbQ,6535
|
152
|
-
khoj/interface/compiled/_next/static/chunks/2327-
|
152
|
+
khoj/interface/compiled/_next/static/chunks/2327-d863b0b21ecb23de.js,sha256=YnTF2ERjtMojL6qsi2RH0ljW0_xDnvjDE_N8IL5mF8M,127516
|
153
153
|
khoj/interface/compiled/_next/static/chunks/2612.bcf5a623b3da209e.js,sha256=_odabGQTNjtpFLdU6FmDdC9zZQkYKJOs8_8QVgMJmEI,76988
|
154
154
|
khoj/interface/compiled/_next/static/chunks/2849.dc00ae5ba7219cfc.js,sha256=cVUiYRj2GweNQ4unKpJIhdr_xO5s2hRy3UWK-81rZW8,182
|
155
|
-
khoj/interface/compiled/_next/static/chunks/2939-
|
155
|
+
khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js,sha256=8BI0oAQSZQj37UZX_igaTvuTgW0nGvVtvyG9G9byr_k,35749
|
156
156
|
khoj/interface/compiled/_next/static/chunks/303.fe76de943e930fbd.js,sha256=gvkmkEYSLe4Iy-8Ti4Ty_OYjkHyrIpgUnfuoQSX577g,178
|
157
157
|
khoj/interface/compiled/_next/static/chunks/3265.924139c4146ee344.js,sha256=O0nwy9HzDY8Df66o72--Lw9RguS5Mh4ExT-uBxdRUbA,636
|
158
158
|
khoj/interface/compiled/_next/static/chunks/3489.c523fe96a2eee74f.js,sha256=s2F6I_29rsqcu-8229-nssfws7vZO7cuQJYqehK7tbk,21715
|
159
159
|
khoj/interface/compiled/_next/static/chunks/3592-b2a2444b0ec7b119.js,sha256=ADfFNp0QHqmz0sHmTSpE-hWnh09AxVVzZb6zcx_ATmg,42200
|
160
160
|
khoj/interface/compiled/_next/static/chunks/3595-ac8e81e04ecb89cb.js,sha256=43eYa6m0ZuFnnBOPTa6S-T0WeLftHEZDlkMe4b7fmIA,21564
|
161
161
|
khoj/interface/compiled/_next/static/chunks/4327.8d2a1b8f1ea78208.js,sha256=VKeC1Y6778Nlt-spX9W9dL8Ex-d2N5AEj53AOVUXGWE,322147
|
162
|
-
khoj/interface/compiled/_next/static/chunks/4447-
|
162
|
+
khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js,sha256=PUldPCrWRAgi5rxqTzWS1boopyuyAQpzzBg-p4TQnNw,19716
|
163
163
|
khoj/interface/compiled/_next/static/chunks/4533.586e74b45a2bde25.js,sha256=eDHOyGa-CuCVeyXtnx3YWmjvlpWveAj6Mu-bMlm3OJg,25567
|
164
164
|
khoj/interface/compiled/_next/static/chunks/4551.82ce1476b5516bc2.js,sha256=G1EoTZRkMLtwYqsLCyQ9iA_9nvi8oj7_t3qboNWtdfY,71097
|
165
165
|
khoj/interface/compiled/_next/static/chunks/4609-33aa487dff03a9fd.js,sha256=1M6QAfVZa2g2Q4jXRdSI1wjrZ4G9yKjINJt8qyTKm1A,24698
|
@@ -170,9 +170,9 @@ khoj/interface/compiled/_next/static/chunks/5210.cd35a1c1ec594a20.js,sha256=sz7i
|
|
170
170
|
khoj/interface/compiled/_next/static/chunks/5303-c65c9c6aeb263a0d.js,sha256=M3E1iLGUW0xbsmV6JMVQBNFlptBYWK8fhfYQattqRXw,143857
|
171
171
|
khoj/interface/compiled/_next/static/chunks/5329.f8b3c5b3d16159cd.js,sha256=452Bf2U_iLUeM0vZce-s1k75k_osL4kVm7uG72xPER8,418
|
172
172
|
khoj/interface/compiled/_next/static/chunks/5427-13d6ffd380fdfab7.js,sha256=gGx3O30h-Rb3MDqcMeD3wmOZnauuOIkz4Cv-NnVEjIE,32619
|
173
|
-
khoj/interface/compiled/_next/static/chunks/5477-
|
173
|
+
khoj/interface/compiled/_next/static/chunks/5477-c4209b72942d3038.js,sha256=LkXuXSSFpmu1ZZUR2ZdV9b6aFHQUb4krBJjf5aeUI0k,14624
|
174
174
|
khoj/interface/compiled/_next/static/chunks/558-c14e76cff03f6a60.js,sha256=8fgZkhFBwG3NfWM3P65XkA7ffRg3vDEhwjyiWLiXMBg,87244
|
175
|
-
khoj/interface/compiled/_next/static/chunks/5639-
|
175
|
+
khoj/interface/compiled/_next/static/chunks/5639-0c4604668cb2d4c0.js,sha256=FUVuhw9Ys2-PiZB3vOfCadzej3ptFqnOij_WOMOVnY8,1635449
|
176
176
|
khoj/interface/compiled/_next/static/chunks/5830.8876eccb82da9b7d.js,sha256=JRJTpsXUOOcNum5Vx6qd0mAGcts6WLOiLpLkPHK5QHQ,42176
|
177
177
|
khoj/interface/compiled/_next/static/chunks/6230.88a71d8145347b3f.js,sha256=YhcKpzA0q12f9fJ5y5cBC3OMEDi5CtKedyppboP31u8,418
|
178
178
|
khoj/interface/compiled/_next/static/chunks/6434.e6cd986d690f2cef.js,sha256=fVR1V4ENz1Qeebsoe8N8XNVbcwGBBhdnTJY-157Y0sg,36261
|
@@ -185,13 +185,14 @@ khoj/interface/compiled/_next/static/chunks/7760.35649cc21d9585bd.js,sha256=MJ9q
|
|
185
185
|
khoj/interface/compiled/_next/static/chunks/83.48e2db193a940052.js,sha256=j8X0kemaNExxw4lDZCgkev1HeK37NM_kE6p73WuHjs8,175
|
186
186
|
khoj/interface/compiled/_next/static/chunks/8427.844694e06133fb51.js,sha256=U388feyx6dj6PZblInnwOgAKlPg1f2Vp-oCFhh2SiXY,186
|
187
187
|
khoj/interface/compiled/_next/static/chunks/8665.4db7e6b2e8933497.js,sha256=HovLNJSM0SJRkjLNg0cim_NDnGiVPbUrEQG8YQkGA2Y,45791
|
188
|
-
khoj/interface/compiled/_next/static/chunks/8667-
|
188
|
+
khoj/interface/compiled/_next/static/chunks/8667-50b03a89e82e0ba7.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
|
189
189
|
khoj/interface/compiled/_next/static/chunks/8694.2bd9c2f65d8c5847.js,sha256=JKqMqrtPf1LK-SmVgLk_F8EjAC6IGKl4lnfWU6q4JXA,33661
|
190
190
|
khoj/interface/compiled/_next/static/chunks/872.caf84cc1a39ae59f.js,sha256=xdPZDnCGiugQ4JwV1FzzYyBEvuXQLOqSw_cMbOJKjtw,11253
|
191
191
|
khoj/interface/compiled/_next/static/chunks/8888.ebe0e552b59e7fed.js,sha256=c5icsYFTx7epn588gtjfP9lKKMdINc07w1P7t56ac8E,3775
|
192
192
|
khoj/interface/compiled/_next/static/chunks/8890.6e8a59e4de6978bc.js,sha256=UgHpyhvA3s1knHgPf3oPgvJ6bqStNOv-6uhQUHBtOGE,36317
|
193
193
|
khoj/interface/compiled/_next/static/chunks/8950.5f2272e0ac923f9e.js,sha256=pxyd8W7Yv79gp8mslLSR_We6gpJOc-JoNkRbM7rgZ94,412
|
194
194
|
khoj/interface/compiled/_next/static/chunks/90542734.2c21f16f18b22411.js,sha256=mFFt4YDMnvCB84YuPgH0V6wX9UvHwoztnhHgL6cad-g,426479
|
195
|
+
khoj/interface/compiled/_next/static/chunks/9139-8ac4d9feb10f8869.js,sha256=uwVs14McY01hs1lkHG2t8Z_z2EC11NConM1NJPuMXbc,48934
|
195
196
|
khoj/interface/compiled/_next/static/chunks/9202.c703864fcedc8d1f.js,sha256=q728YuRC6vTO64ARqaguEZH6Udhdu6IU3rDGmfdtN6I,24367
|
196
197
|
khoj/interface/compiled/_next/static/chunks/9245.a04e92d034540234.js,sha256=NH1VEr8vi6CkKDFpPgGimz2jfNwpoE4AUFQ86SKmRwg,145680
|
197
198
|
khoj/interface/compiled/_next/static/chunks/9320.6aca4885d541aa44.js,sha256=mMJG3Ncy8a0GVDZPNPan_vWjjYTrr6R8PRFHo1MAXBI,4207
|
@@ -199,7 +200,6 @@ khoj/interface/compiled/_next/static/chunks/945-74376499b067d28e.js,sha256=e_lXz
|
|
199
200
|
khoj/interface/compiled/_next/static/chunks/94ca1967.1b3402358e0e1255.js,sha256=WJXEIy24FD6PNQePg-uahendJMNc03GgnVveitFeshI,1174524
|
200
201
|
khoj/interface/compiled/_next/static/chunks/9535.f78cd92d03331e55.js,sha256=nr2CB4ZZ2hZInusLxQMZGBad68a-3Imn3UDSwAe-WKs,178
|
201
202
|
khoj/interface/compiled/_next/static/chunks/9537-d9ab442ce15d1e20.js,sha256=vMeeHKfwjLAljpwwlIoNfgwDsm8gZyqLA5PnStKIWPU,42469
|
202
|
-
khoj/interface/compiled/_next/static/chunks/9568-0d60ac475f4cc538.js,sha256=j2gSoGMavadS0jshP5omkzr1K_FwQFclrzXhLOUETFc,26845
|
203
203
|
khoj/interface/compiled/_next/static/chunks/964ecbae.d5be7c49c320d695.js,sha256=Dp7-5a_bYiET4lBiy1sTrb1cQnE3_TC0f1EQCD2Coko,1175124
|
204
204
|
khoj/interface/compiled/_next/static/chunks/9968.b111fc002796da81.js,sha256=uaKF_VIHPSnjwK6NPXwWaolJo_1d-E43rADivNbk4RA,180
|
205
205
|
khoj/interface/compiled/_next/static/chunks/d3ac728e-4c56e7f41db266b7.js,sha256=KH2S98yagVOcqDG836x8mxIFFjrq11AdYodjBurPvmg,268514
|
@@ -209,33 +209,33 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
|
|
209
209
|
khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
|
210
210
|
khoj/interface/compiled/_next/static/chunks/main-fc8e0fefa2ef3d8c.js,sha256=t9FZIByh6V52m41LQ2yyAReF1CAuY7gLMBuWBeKCX2g,116793
|
211
211
|
khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
|
212
|
-
khoj/interface/compiled/_next/static/chunks/webpack-
|
212
|
+
khoj/interface/compiled/_next/static/chunks/webpack-6355be48bba04af8.js,sha256=xwIzU_S50fgR6fFGLdKxoNNqAjzIfKGqHbBLa2t3x6Y,4949
|
213
213
|
khoj/interface/compiled/_next/static/chunks/app/layout-c2de87a25fededbb.js,sha256=jcU3C37p73V24B118uVRQffNaQES9jihsTGYF4fZ_8o,3949
|
214
|
-
khoj/interface/compiled/_next/static/chunks/app/page-
|
214
|
+
khoj/interface/compiled/_next/static/chunks/app/page-2025944ec1f80144.js,sha256=rz32GmtosFqTqGeK833or3Hjq6Q64yuTsv-vaWh1XAE,29929
|
215
215
|
khoj/interface/compiled/_next/static/chunks/app/_not-found/page-84f94d15b2da4eac.js,sha256=zElhiTkdu2JqrEvJ8Lrxh4HCyfLmPllBHHWOuDtrVlw,1755
|
216
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/layout-
|
217
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/page-
|
216
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/layout-e3d72f0edda6aa0c.js,sha256=FeKQJdykhxnWEDPTdB4jbsqbkKu2UmsIEiTSZevNegg,180
|
217
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/page-9a4610474cd59a71.js,sha256=itxLHi5MI0FicmxrMQidcn-TiDOEec_Jr9M94Aqbhew,17483
|
218
218
|
khoj/interface/compiled/_next/static/chunks/app/automations/layout-63603d2cb33279f7.js,sha256=4OX_fcTQdNVs6HxDdJVWdadMVC_gM86Tkqo2TjBA4gw,5143
|
219
|
-
khoj/interface/compiled/_next/static/chunks/app/automations/page-
|
220
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/layout-
|
221
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/page-
|
222
|
-
khoj/interface/compiled/_next/static/chunks/app/search/layout-
|
223
|
-
khoj/interface/compiled/_next/static/chunks/app/search/page-
|
219
|
+
khoj/interface/compiled/_next/static/chunks/app/automations/page-f7bb9d777b7745d4.js,sha256=2qWZHB-9I9wtGTmajkSbdqLHfJFuPnHAsw7E42Wwomc,34829
|
220
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js,sha256=zKdgnv4zZCkeNWFODWPJKYB3VjkTq4X5LtTCs0sqxaQ,180
|
221
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/page-a8455b8f9d36a2b0.js,sha256=dbYMWCyV2jb-sEcbeb--d7_b0Bm-AUOuKJ2Uzz7oF0k,29312
|
222
|
+
khoj/interface/compiled/_next/static/chunks/app/search/layout-4505b79deb734a30.js,sha256=HPQfR8XLd1MObIR-vRu0kAWYesDP3yGGTA7jyORnrX4,180
|
223
|
+
khoj/interface/compiled/_next/static/chunks/app/search/page-4885df3cd175c957.js,sha256=DFDpUem-27PpUEfqc72xv3zo7TcZpTFjvyXszZSGrNM,30929
|
224
224
|
khoj/interface/compiled/_next/static/chunks/app/settings/layout-f88cedfe9ad4df7c.js,sha256=aFBEgUCsKnoeyULmh7g-DmaznQ0ztcq6y2pj4bSMCIY,6132
|
225
|
-
khoj/interface/compiled/_next/static/chunks/app/settings/page-
|
226
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-
|
227
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-
|
225
|
+
khoj/interface/compiled/_next/static/chunks/app/settings/page-8be3b35178abf2ec.js,sha256=bjgxTUvgwJtv0R8zVFrH-1L8PiUDL5BlolZkDrYk-e4,27892
|
226
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6fb51c5c80f8ec67.js,sha256=MRWVUV6hiulN_DJo7uyZvW0HaMGGqoq6fdGK_jt4kJE,180
|
227
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-ee8ef5270163e7f2.js,sha256=8B0LDeYsH_tp9WzvzoTCI15GZoBprbG0a5ePjywqrrw,5557
|
228
228
|
khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js,sha256=UqtikLsCsOWtDUJOW6Tuk9P-bV1V3MhYd3ghrQuEmfs,286
|
229
229
|
khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js,sha256=w_It3VzKT8O1M3CrJ_hZHsaU7M7dq3EAaVG8KvJ-fhU,253
|
230
|
+
khoj/interface/compiled/_next/static/css/102b97d6472fdd3a.css,sha256=Bgp42fbn5uQu_g0IXo55zpMLiBEyYHSGO3iWbFoaO90,34067
|
230
231
|
khoj/interface/compiled/_next/static/css/3090706713c12a32.css,sha256=lHBNcr2SPiAMdZQONh2MMlVM_huteuNSM9jCqGkS2d0,3075782
|
232
|
+
khoj/interface/compiled/_next/static/css/37a73b87f02df402.css,sha256=hp0vlekKu0K2eITR5YIqFmLHQPqV3JETFnRd_-Uh0mk,165
|
231
233
|
khoj/interface/compiled/_next/static/css/5b28ced915454767.css,sha256=Bk56AIRHovIWNUw8QWvMbXIxxPiyWEiObkMA7RwpMrs,4842
|
232
|
-
khoj/interface/compiled/_next/static/css/76c658ee459140a9.css,sha256=7tI24VB66ZUsAPUxRdQhboopun0AXLUnF64uv9RkC08,1833
|
233
234
|
khoj/interface/compiled/_next/static/css/7889a30fe9c83846.css,sha256=IUkZhkx4GpYOIhN-EJw9T1DqGMO3Wa3mNpUwaOBuZoY,7204
|
234
|
-
khoj/interface/compiled/_next/static/css/
|
235
|
+
khoj/interface/compiled/_next/static/css/c34713c98384ee87.css,sha256=uypGqyDrKf-9vcU_Rf9as1XLvMSMDDfKQjmHnLaixfM,9831
|
235
236
|
khoj/interface/compiled/_next/static/css/db7d90554f3ab82b.css,sha256=A3ZAf0StEG3sr_LxAIizczSTYRe1NbtNUpfslvmkqgk,17713
|
236
237
|
khoj/interface/compiled/_next/static/css/ea5485b3f3859a5a.css,sha256=tn6qi2xSLTWhtzDUE8UlC8iipH9QGV6A9oGj1ap-Sk4,1659
|
237
|
-
khoj/interface/compiled/_next/static/css/
|
238
|
-
khoj/interface/compiled/_next/static/css/fbacbdfd5e7f3f0e.css,sha256=83EGhzX5xQHd-qC-hAcrRUaUAHJJBowDdzi-7Lp81v8,6795
|
238
|
+
khoj/interface/compiled/_next/static/css/fc82e43baa9ae218.css,sha256=Be_9BdHEyKPRPxUfj8TohYKFuadPKlvY6aiIh7yGMNQ,2408
|
239
239
|
khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2,sha256=IzKBwB_bpSGvO7C9aRv29Js-jAbZPRDI-D-P4H2P918,14508
|
240
240
|
khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2,sha256=QjuuSKmViymmy-itXLB1UbSARxFNHWuMiPpCrYqClFI,22728
|
241
241
|
khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2,sha256=VH1XkI87HdFVhsurH5D5ekEjG_ZORTVBVg6xz7p87C8,16704
|
@@ -313,8 +313,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
|
|
313
313
|
khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
|
314
314
|
khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
|
315
315
|
khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
|
316
|
-
khoj/interface/compiled/agents/index.html,sha256=
|
317
|
-
khoj/interface/compiled/agents/index.txt,sha256=
|
316
|
+
khoj/interface/compiled/agents/index.html,sha256=wlfoOlboF5CjuZ81UEIGg2tFJNo9bZCHsC5YVrYjuLg,16532
|
317
|
+
khoj/interface/compiled/agents/index.txt,sha256=S7fS5eRWF7NbhmaDixIyJo_4P2fTwUxmAvdTBvvB8Vg,7351
|
318
318
|
khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
|
319
319
|
khoj/interface/compiled/assets/icons/khoj_lantern.svg,sha256=I_8XP5X84gEOoCRhCRKOQn_GKZrz3SUBXct7WxHvY7c,8767
|
320
320
|
khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png,sha256=xDx0bbD-WMflgg8zck9oPIIuTIvywtuED2k7CjSQS4w,66194
|
@@ -329,16 +329,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
|
|
329
329
|
khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
|
330
330
|
khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
|
331
331
|
khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
|
332
|
-
khoj/interface/compiled/automations/index.html,sha256=
|
333
|
-
khoj/interface/compiled/automations/index.txt,sha256=
|
334
|
-
khoj/interface/compiled/chat/index.html,sha256=
|
335
|
-
khoj/interface/compiled/chat/index.txt,sha256=
|
336
|
-
khoj/interface/compiled/search/index.html,sha256=
|
337
|
-
khoj/interface/compiled/search/index.txt,sha256=
|
338
|
-
khoj/interface/compiled/settings/index.html,sha256=
|
339
|
-
khoj/interface/compiled/settings/index.txt,sha256=
|
340
|
-
khoj/interface/compiled/share/chat/index.html,sha256=
|
341
|
-
khoj/interface/compiled/share/chat/index.txt,sha256=
|
332
|
+
khoj/interface/compiled/automations/index.html,sha256=6VFk_bM8jCKjvFqKExWr-FTg6LcUvit3DERFMvrQI4U,54402
|
333
|
+
khoj/interface/compiled/automations/index.txt,sha256=R1UNtRaozakPYAnTIQxotO0hnDLzlyoro1cCENFWMVA,7580
|
334
|
+
khoj/interface/compiled/chat/index.html,sha256=b0sPw7yrs7T76W0laDGlzBa38hJaO2QvPnfbqRD-kjg,53842
|
335
|
+
khoj/interface/compiled/chat/index.txt,sha256=srUdn5_K5gYI8EuWgrfo_jQODVGWecX4EjbQuK_gkIQ,8124
|
336
|
+
khoj/interface/compiled/search/index.html,sha256=SroZA_t9woCimbaFl7nAMIoUhPntOViS8PU_2BoDJE8,55611
|
337
|
+
khoj/interface/compiled/search/index.txt,sha256=EweptJMNkryUQW2USkI-QymQIgzJ6t5JoLgk0Cd7ON8,6698
|
338
|
+
khoj/interface/compiled/settings/index.html,sha256=eSZmosqdvYjAV0TE9apwgCBLVndxsDBQUxfvQt4QIkU,53050
|
339
|
+
khoj/interface/compiled/settings/index.txt,sha256=_JDgnHRocf_qUVVtVlB9UxYokfhQeuuJA6WLbl0ct2g,7834
|
340
|
+
khoj/interface/compiled/share/chat/index.html,sha256=z3OH5yCf4f28-Ghz8k-fsj01N2a8a2t5HjbPL8UdpDo,53802
|
341
|
+
khoj/interface/compiled/share/chat/index.txt,sha256=WJJk8NPJZjQObu89YxoypSKok5V6QcqDrue8izUckaM,8320
|
342
342
|
khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
|
343
343
|
khoj/interface/email/magic_link.html,sha256=372ESbTPKM9acekuZcOIKOw6kBl-KikFg_L9MOHqJkg,2094
|
344
344
|
khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
|
@@ -391,7 +391,7 @@ khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
391
391
|
khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
|
392
392
|
khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
393
393
|
khoj/processor/conversation/prompts.py,sha256=F0MVg81Tr7L4W7ubx_UJ-D4PqgGCElTg8KLpQjdPuIk,54207
|
394
|
-
khoj/processor/conversation/utils.py,sha256=
|
394
|
+
khoj/processor/conversation/utils.py,sha256=bpl6y5CWqVShE8fBbpZSl9-aOTGNiBjwXXAORy5ebck,48589
|
395
395
|
khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
396
396
|
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=6IG-YlpFx86EgW3PdGuv4xGMRzvHx4xVUcQMqkKn4vs,5358
|
397
397
|
khoj/processor/conversation/anthropic/utils.py,sha256=Z7mz-LnunLHubZvdzNEAozlJxukl2eNoLvYzeYzsglc,16568
|
@@ -408,7 +408,7 @@ khoj/processor/conversation/openai/utils.py,sha256=0P-vjY4ip4T3ZZg-VI0y8WgOzppr7
|
|
408
408
|
khoj/processor/conversation/openai/whisper.py,sha256=zoEeK1LNCg_tzP4xzYi5vRPzNPGuDGzpkrkG7d1LUn4,447
|
409
409
|
khoj/processor/image/generate.py,sha256=bF80fjsHKkU2f2ADiXJei8-ViqcT0EHaM0wH78KPUC8,12199
|
410
410
|
khoj/processor/operator/README.md,sha256=QaV00W1IB7i8ZrvhNkpjmFMVDtORFt-OASieRQGE_UE,2308
|
411
|
-
khoj/processor/operator/__init__.py,sha256=
|
411
|
+
khoj/processor/operator/__init__.py,sha256=NXvGaW3wvWH1WpYq7uABPThXgkabLlp3ijnFPf5QRn8,11182
|
412
412
|
khoj/processor/operator/grounding_agent.py,sha256=eyWCaIHg12Ak2SbCl7aiiFSoDZ88-AlrqQElRDdDXDE,18917
|
413
413
|
khoj/processor/operator/grounding_agent_uitars.py,sha256=Ujdug_Z2_r1tZmy5kBtHbZcqOp0jSH-7ZnYo1fVdcDQ,42261
|
414
414
|
khoj/processor/operator/operator_actions.py,sha256=eJHxs6idstIbGzzRPHsveuJxl5jH9dHvBhOxuAqjg7M,4268
|
@@ -428,16 +428,16 @@ khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
428
428
|
khoj/routers/api.py,sha256=BFiKwdYjkR-4aHBumM7Hu4XdN2RvQ0Z9V4_2Wd8aPiM,8633
|
429
429
|
khoj/routers/api_agents.py,sha256=QcognyY9FwClgOZw21BF9K7IX16i2070kRoM7c_bKn8,17264
|
430
430
|
khoj/routers/api_automation.py,sha256=ux990dRLbcFadV01T-1McPwvFeR0KLyrWAVpCJ3YLvk,9399
|
431
|
-
khoj/routers/api_chat.py,sha256=
|
431
|
+
khoj/routers/api_chat.py,sha256=_kerg-eHFmBUW9f_kd3XHZzE0nzWm2RPOljSpgh73nc,63331
|
432
432
|
khoj/routers/api_content.py,sha256=GFChoWm4nYdilhzB1ElbJjaJJRfLn8XtkKmLnZOUHrU,24580
|
433
433
|
khoj/routers/api_model.py,sha256=hjIgOQqva4YVv1osQK8p-317_oSKsv1mHbAYFQICxnM,5273
|
434
434
|
khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
|
435
435
|
khoj/routers/api_subscription.py,sha256=_Z3gwW5348qrF7sF9rqwkeG291KX5olr9Fd_-ri9faE,6480
|
436
436
|
khoj/routers/auth.py,sha256=jk2lqAS_650lQsoaOFTlZd9W_LL8HbN5zhHTZza_lqs,11258
|
437
437
|
khoj/routers/email.py,sha256=wvr6_fpk0RuKcTPC6suI8JDZPLYzJ9hAhz_G41yZytc,3923
|
438
|
-
khoj/routers/helpers.py,sha256
|
438
|
+
khoj/routers/helpers.py,sha256=-S8MQ5ZOKIjq6u6vhwFffR0fyw4XxQyi85xy2Ov3FOE,123430
|
439
439
|
khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
|
440
|
-
khoj/routers/research.py,sha256=
|
440
|
+
khoj/routers/research.py,sha256=XO8oO9okfMMWFC4JpJ-lR7vDpf6_-HTjGJcNAUd2HC8,26380
|
441
441
|
khoj/routers/storage.py,sha256=lao0DvsF49QleZvOdjKM98RU2cGfCJDBb7WeoI7Rr3I,2172
|
442
442
|
khoj/routers/twilio.py,sha256=MLsuCm4--ETvr3sLxbF0CL_ehlg_l2rKBSLR2Qh2Xls,1081
|
443
443
|
khoj/routers/web_client.py,sha256=_vyfDaHZZjNoI2LwGNQFRiFmGLkNcgYJe7dOr3mrxH8,4386
|
@@ -457,11 +457,11 @@ khoj/utils/helpers.py,sha256=tLO-rn0eThQVuomSxCMtlEN0WKsSaOZw23-4SCRRwy8,42593
|
|
457
457
|
khoj/utils/initialization.py,sha256=_KslgIsoo-1A_ZuouHH3WDbV-TpqBSaID_0b-1xXE0U,15169
|
458
458
|
khoj/utils/jsonl.py,sha256=0Ac_COqr8sLCXntzZtquxuCEVRM2c3yKeDRGhgOBRpQ,1192
|
459
459
|
khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
|
460
|
-
khoj/utils/rawconfig.py,sha256=
|
460
|
+
khoj/utils/rawconfig.py,sha256=lgq0FfJOkdALLkoISjmBSEnzuaTPShsTuFUbXlf6brk,5406
|
461
461
|
khoj/utils/state.py,sha256=s_GFWOqRzpEDx0eCPStuzBTK2VEw-qgRpH0aiEdGnDo,1791
|
462
462
|
khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
|
463
|
-
khoj-2.0.
|
464
|
-
khoj-2.0.
|
465
|
-
khoj-2.0.
|
466
|
-
khoj-2.0.
|
467
|
-
khoj-2.0.
|
463
|
+
khoj-2.0.0b9.dist-info/METADATA,sha256=G4DX76ZAi85BLRfLTx2owlZTYD6yL329wnIkM62O7_Q,8968
|
464
|
+
khoj-2.0.0b9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
465
|
+
khoj-2.0.0b9.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
|
466
|
+
khoj-2.0.0b9.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
467
|
+
khoj-2.0.0b9.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5477],{5477:function(e,t,a){"use strict";a.d(t,{$:function(){return r},a:function(){return A}});var s,r,n=a(57437),l=a(26442),o=a.n(l),i=a(2265),c=a(18848);a(2446);var d=a(50513),u=a(7751),h=a(26963),f=a(807),g=a(87907),x=a(46743),m=a(53288),p=a(23518),j=a(37099),b=a(62869),v=a(32759),w=a(57054),y=a(27312),N=a(76818),k=a(81103),C=a(84671),E=a(39535),D=a(14308),S=a(42225),T=a(59199),M=a(7436),R=a(26110),z=a(19378);(s=r||(r={})).MESSAGE="message",s.FILE="file",s.RESEARCH="research";let A=(0,i.forwardRef)((e,t)=>{let[a,s]=(0,i.useState)(""),r=(0,i.useRef)(null),l=(0,i.useRef)(null),A=(0,i.useRef)(null),[O,I]=(0,i.useState)(null),[L,_]=(0,i.useState)(null),[P,F]=(0,i.useState)(!1),[W,U]=(0,i.useState)(null),[$,H]=(0,i.useState)(!1),[J,B]=(0,i.useState)(!1),[K,Y]=(0,i.useState)([]),[Z,X]=(0,i.useState)([]),[q,G]=(0,i.useState)(null),[V,Q]=(0,i.useState)([]),[ee,et]=(0,i.useState)(!1),[ea,es]=(0,i.useState)(null),[er,en]=(0,i.useState)(0),[el,eo]=(0,i.useState)(!1),[ei,ec]=(0,i.useState)(!1),[ed,eu]=(0,i.useState)(e.isResearchModeEnabled||!1);function eh(){if(!a.trim()&&0===Z.length)return;if(!e.isLoggedIn){U("Hey there, you need to be signed in to send messages to Khoj AI"),H(!0);return}e.sendDisabled&&e.setTriggeredAbort(!0),J&&(B(!1),Y([]),Z.forEach(t=>e.sendImage(t)));let t=a.trim(),r=e.chatOptionsData&&Object.keys(e.chatOptionsData).some(e=>t.startsWith("/".concat(e)));ed&&!r&&(t="/research ".concat(t)),e.sendMessage(t),G(null),Q([]),s("")}function ef(a){var s,r;if(!e.isLoggedIn){U("Please login to chat with your files"),H(!0);return}let n=["jpg","jpeg","png","webp"],l=[];for(let e=0;e<a.length;e++){let t=a[e],s=t.name.split(".").pop();n.includes(s||"")&&l.push(c.Z.sanitize(URL.createObjectURL(t)))}l.length>0&&(B(!0),Y(e=>[...e,...l]),null==t||null===(r=t.current)||void 0===r||r.focus());let o=Array.from(a).filter(e=>!n.includes(e.name.split(".").pop()||"")),i=o?Array.from(o).concat(Array.from(q||[])):Array.from(q||[]);if(i.length>0){for(let e=0;e<i.length;e++)if(i[e].size>10485760){I("File ".concat(i[e].name," is too large. Please upload files smaller than 10 MB."));return}let t=new DataTransfer;i.forEach(e=>t.items.add(e)),eg(t.files).then(a=>{e.setUploadedFiles(a),G(t.files),Q(a)})}null==t||null===(s=t.current)||void 0===s||s.focus()}async function eg(e){let t=await (0,T.M1)(e);F(!0);try{let e=await fetch("/api/content/convert",{method:"POST",body:t});if(F(!1),!e.ok)throw Error("HTTP error! status: ".concat(e.status));return await e.json()}catch(e){return _("Error converting files. "+e+". Please try again, or contact team@khoj.dev if the issue persists."),console.error("Error converting files:",e),[]}}async function ex(){try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e,{mimeType:"audio/webm"}),a=[];t.ondataavailable=async e=>{a.push(e.data);let t=new Blob(a,{type:"audio/webm"}),r=new FormData;r.append("file",t);try{let e=await fetch("/api/transcribe",{method:"POST",body:r});if(!e.ok)throw Error("Network response was not ok");let t=await e.json();s(t.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},t.start(1500),t.onstop=async()=>{let e=new Blob(a,{type:"audio/webm"}),r=new FormData;r.append("file",e);try{let e=await fetch("/api/transcribe",{method:"POST",body:r});if(!e.ok)throw Error("Network response was not ok");let a=await e.json();t.stream.getTracks().forEach(e=>e.stop()),es(null),s(a.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},es(t)}catch(e){console.error("Error getting microphone",e)}}return(0,i.useEffect)(()=>{if(P||en(0),P){let e=setInterval(()=>{en(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[P]),(0,i.useEffect)(()=>{var a;void 0!==e.prefillMessage&&(s(e.prefillMessage),null==t||null===(a=t.current)||void 0===a||a.focus())},[e.prefillMessage]),(0,i.useEffect)(()=>{var a,s,r;"message"===e.focus?null==t||null===(a=t.current)||void 0===a||a.focus():"file"===e.focus?null===(s=l.current)||void 0===s||s.focus():"research"===e.focus&&(null===(r=A.current)||void 0===r||r.focus())},[e.focus]),(0,i.useEffect)(()=>{async function e(){K.length>0&&X(await Promise.all(K.map(async e=>{let t=await fetch(e),a=await t.blob();return new Promise(e=>{let t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(a)})}))),F(!1)}F(!0),e()},[K]),(0,i.useEffect)(()=>{e.isResearchModeEnabled&&eu(e.isResearchModeEnabled)},[e.isResearchModeEnabled]),(0,i.useEffect)(()=>{!ee&&ea&&ea.stop(),ee&&!ea&&ex()},[ee,ea]),(0,i.useEffect)(()=>{(null==t?void 0:t.current)&&(t.current.style.height="auto",t.current.style.height=Math.max(t.current.scrollHeight-24,64)+"px",a.startsWith("/")&&1===a.split(" ").length?ec(!0):ec(!1))},[a]),(0,n.jsxs)(n.Fragment,{children:[$&&W&&(0,n.jsx)(E.Z,{onOpenChange:H,isMobileWidth:e.isMobileWidth}),P&&(0,n.jsx)(j.aR,{open:P,children:(0,n.jsxs)(j._T,{children:[(0,n.jsx)(j.fY,{children:(0,n.jsx)(j.f$,{children:"Uploading data. Please wait."})}),(0,n.jsx)(j.yT,{children:(0,n.jsx)(v.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:er})}),(0,n.jsx)(j.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>F(!1),children:"Dismiss"})]})}),O&&(0,n.jsx)(j.aR,{open:null!==O,children:(0,n.jsxs)(j._T,{children:[(0,n.jsx)(j.fY,{children:(0,n.jsx)(j.f$,{children:"Data Upload Warning"})}),(0,n.jsx)(j.yT,{children:O}),(0,n.jsx)(j.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>I(null),children:"Close"})]})}),L&&(0,n.jsx)(j.aR,{open:null!==L,children:(0,n.jsxs)(j._T,{children:[(0,n.jsxs)(j.fY,{children:[(0,n.jsx)(j.f$,{children:"Oh no!"}),(0,n.jsx)(j.yT,{children:"Something went wrong while uploading your data"})]}),(0,n.jsx)(j.yT,{children:L}),(0,n.jsx)(j.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>_(null),children:"Close"})]})}),ei&&(0,n.jsx)("div",{className:"flex justify-center text-center",children:(0,n.jsxs)(w.J2,{open:ei,onOpenChange:ec,children:[(0,n.jsx)(y.xo,{className:"flex justify-center text-center"}),(0,n.jsx)(w.yk,{onOpenAutoFocus:e=>e.preventDefault(),className:"".concat(e.isMobileWidth?"w-[100vw]":"w-full"," rounded-md"),side:"bottom",align:"center",sideOffset:e.conversationId?0:80,alignOffset:0,children:(0,n.jsxs)(p.mY,{className:"max-w-full",children:[(0,n.jsx)(p.sZ,{placeholder:"Type a command or search...",value:a,className:"hidden"}),(0,n.jsxs)(p.e8,{children:[(0,n.jsx)(p.rb,{children:"No matching commands."}),(0,n.jsx)(p.fu,{heading:"Agent Tools",children:e.chatOptionsData&&Object.entries(e.chatOptionsData).map(e=>{let[t,a]=e;return(0,n.jsx)(p.di,{className:"text-md",onSelect:()=>{s("/".concat(t," "))},children:(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-1",children:[(0,n.jsxs)("div",{className:"font-bold flex items-center",children:[(0,S.vH)(t,"h-4 w-4 mr-2"),"/",t]}),(0,n.jsx)("div",{children:a})]})},t)})}),(0,n.jsx)(p.zz,{})]})]})})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto",children:[J&&K.map((e,t)=>(0,n.jsxs)("div",{className:"relative flex-shrink-0 pb-3 pt-2 group",children:[(0,n.jsx)("img",{src:e,alt:"img-".concat(t),className:"w-auto h-16 object-cover rounded-xl"}),(0,n.jsx)(b.z,{variant:"ghost",size:"icon",className:"absolute -top-0 -right-2 h-5 w-5 rounded-full bg-neutral-200 dark:bg-neutral-600 hover:bg-neutral-300 dark:hover:bg-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{Y(e=>e.filter((e,a)=>a!==t)),X(e=>e.filter((e,a)=>a!==t)),1===K.length&&B(!1)},children:(0,n.jsx)(d.X,{className:"h-3 w-3"})})]},t)),V&&Array.from(V).map((t,a)=>(0,n.jsxs)(R.Vq,{children:[(0,n.jsx)(R.hg,{asChild:!0,children:(0,n.jsxs)("div",{className:"relative flex-shrink-0 p-2 group",children:[(0,n.jsx)("div",{className:"w-auto h-16 object-cover rounded-xl ".concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," bg-opacity-15"),children:(0,n.jsxs)("div",{className:"flex p-2 flex-col justify-start items-start h-full",children:[(0,n.jsx)("span",{className:"text-sm font-bold text-neutral-500 dark:text-neutral-400 text-ellipsis truncate max-w-[200px] break-words",children:t.name}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,S.Le)(t.file_type),(0,n.jsx)("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:(0,M.xq)(t.size)})]})]})}),(0,n.jsx)(b.z,{variant:"ghost",size:"icon",className:"absolute -top-0 -right-2 h-5 w-5 rounded-full bg-neutral-200 dark:bg-neutral-600 hover:bg-neutral-300 dark:hover:bg-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{G(a=>{let s=t.name;if(!a)return null;let r=Array.from(a).filter(e=>e.name!==s),n=new DataTransfer;r.forEach(e=>n.items.add(e));let l=V.filter(e=>e.name!==s);return e.setUploadedFiles(l),Q(l),n.files})},children:(0,n.jsx)(d.X,{className:"h-3 w-3"})})]},a)}),(0,n.jsxs)(R.cZ,{children:[(0,n.jsx)(R.fK,{children:(0,n.jsx)(R.$N,{children:t.name})}),(0,n.jsx)(R.Be,{children:(0,n.jsx)(z.x,{className:"h-72 w-full rounded-md",children:t.content})})]})]},a))]}),(0,n.jsxs)("div",{className:"".concat(o().actualInputArea," justify-between dark:bg-neutral-700 relative ").concat(el&&"animate-pulse"),onDragOver:function(e){e.preventDefault(),eo(!0)},onDragLeave:function(e){e.preventDefault(),eo(!1)},onDrop:function(e){e.preventDefault(),eo(!1),e.dataTransfer.files&&ef(e.dataTransfer.files)},children:[(0,n.jsx)("input",{type:"file",accept:".pdf,.doc,.docx,.txt,.md,.org,.jpg,.jpeg,.png,.webp,.py,.tsx,.js,.json,.html,.css,.ipynb",multiple:!0,ref:r,onChange:function(e){e.target.files&&ef(e.target.files)},style:{display:"none"}}),(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:(0,n.jsx)(b.z,{variant:"ghost",className:"!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500",disabled:!e.isLoggedIn,onClick:function(){r.current&&r.current.click()},ref:l,children:(0,n.jsx)(u.p,{className:"w-8 h-8"})})}),(0,n.jsx)(k._v,{children:"Attach a PDF, plain text file, or image"})]})})}),(0,n.jsx)("div",{className:"flex-grow flex flex-col w-full gap-1.5 relative",children:(0,n.jsx)(N.g,{ref:t,className:"border-none focus:border-none\n focus:outline-none focus-visible:ring-transparent\n w-full h-16 min-h-16 max-h-[128px] md:py-4 rounded-lg resize-none dark:bg-neutral-700\n ".concat(e.isMobileWidth?"text-md":"text-lg"),placeholder:"Type / to see a list of commands",id:"message",autoFocus:!0,value:a,onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||e.isMobileWidth||ee||!a||(B(!1),Y([]),t.preventDefault(),eh())},onChange:e=>s(e.target.value),disabled:ee})}),(0,n.jsxs)("div",{className:"flex items-end pb-2",children:[ee?(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:(0,n.jsx)(b.z,{variant:"default",className:"".concat(!ee&&"hidden"," ").concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{et(!ee)},disabled:e.sendDisabled||!e.isLoggedIn,children:(0,n.jsx)(h.d,{weight:"fill",className:"w-6 h-6"})})}),(0,n.jsx)(k._v,{children:"Click to stop recording and transcribe your voice."})]})}):ea?(0,n.jsx)(D.l,{}):(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:e.sendDisabled&&!a?(0,n.jsx)(b.z,{variant:"default",className:"".concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{e.setTriggeredAbort(!0)},children:(0,n.jsx)(h.d,{weight:"fill",className:"w-6 h-6"})}):(0,n.jsx)(b.z,{variant:"default",className:"".concat(!a||ee||"hidden"," ").concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),disabled:e.sendDisabled||!e.isLoggedIn,onClick:()=>{s("Listening..."),et(!ee)},children:(0,n.jsx)(f.P,{weight:"fill",className:"w-6 h-6"})})}),(0,n.jsx)(k._v,{children:e.sendDisabled?"Click here to stop the streaming.":"Click to transcribe your message with voice."})]})}),(0,n.jsx)(b.z,{className:"".concat((!a||ee)&&"hidden"," ").concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),disabled:!a||ee||!e.isLoggedIn,onClick:eh,children:(0,n.jsx)(g.a,{className:"w-6 h-6",weight:"bold"})})]})]}),(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:(0,n.jsxs)(b.z,{variant:"ghost",className:"float-right justify-center gap-1 flex items-center p-1.5 mr-2 h-fit",disabled:e.sendDisabled||!e.isLoggedIn,ref:A,onClick:()=>{var e;eu(!ed),null==t||null===(e=t.current)||void 0===e||e.focus()},children:[(0,n.jsx)("span",{className:"text-muted-foreground text-sm",children:"Research Mode"}),ed?(0,n.jsx)(x.W,{weight:"fill",className:"w-6 h-6 inline-block ".concat(e.agentColor?(0,C.oz)(e.agentColor):(0,C.oz)("orange")," rounded-full")}):(0,n.jsx)(m.$,{weight:"fill",className:"w-6 h-6 inline-block ".concat((0,C.oz)("gray")," rounded-full")})]})}),(0,n.jsx)(k._v,{className:"text-xs",children:"Research Mode allows you to get more deeply researched, detailed responses. Response times may be longer."})]})})]})]})});A.displayName="ChatInputArea"},32759:function(e,t,a){"use strict";a.d(t,{E:function(){return o}});var s=a(57437),r=a(2265),n=a(60610),l=a(94508);let o=r.forwardRef((e,t)=>{let{className:a,value:r,indicatorColor:o,...i}=e;return(0,s.jsx)(n.fC,{ref:t,className:(0,l.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",a),...i,children:(0,s.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(o),style:{transform:"translateX(-".concat(100-(r||0),"%)")}})})});o.displayName=n.fC.displayName},76818:function(e,t,a){"use strict";a.d(t,{g:function(){return l}});var s=a(57437),r=a(2265),n=a(94508);let l=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...r})});l.displayName="Textarea"},26442:function(e){e.exports={actualInputArea:"chatInputArea_actualInputArea__Ha6cN"}}}]);
|