khoj 2.0.0b8.dev1__py3-none-any.whl → 2.0.0b9.dev7__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.
Files changed (65) hide show
  1. khoj/database/adapters/__init__.py +3 -2
  2. khoj/database/models/__init__.py +28 -0
  3. khoj/interface/compiled/404/index.html +2 -2
  4. khoj/interface/compiled/_next/static/chunks/{2327-d863b0b21ecb23de.js → 2327-ea623ca2d22f78e9.js} +1 -1
  5. khoj/interface/compiled/_next/static/chunks/5477-c4209b72942d3038.js +1 -0
  6. khoj/interface/compiled/_next/static/chunks/{5639-0c4604668cb2d4c0.js → 5639-09e2009a2adedf8b.js} +1 -1
  7. khoj/interface/compiled/_next/static/chunks/9139-ce1ae935dac9c871.js +1 -0
  8. khoj/interface/compiled/_next/static/chunks/app/agents/layout-4e2a134ec26aa606.js +1 -0
  9. khoj/interface/compiled/_next/static/chunks/app/agents/{page-5db6ad18da10d353.js → page-0006674668eb5a4d.js} +1 -1
  10. khoj/interface/compiled/_next/static/chunks/app/automations/{page-6271e2e31c7571d1.js → page-4c465cde2d14cb52.js} +1 -1
  11. khoj/interface/compiled/_next/static/chunks/app/chat/layout-d6acbba22ccac0ff.js +1 -0
  12. khoj/interface/compiled/_next/static/chunks/app/chat/page-4408125f66c165cf.js +1 -0
  13. khoj/interface/compiled/_next/static/chunks/app/{page-a19a597629e87fb8.js → page-85b9b416898738f7.js} +1 -1
  14. khoj/interface/compiled/_next/static/chunks/app/search/layout-484d34239ed0f2b1.js +1 -0
  15. khoj/interface/compiled/_next/static/chunks/app/search/{page-fa366ac14b228688.js → page-883b7d8d2e3abe3e.js} +1 -1
  16. khoj/interface/compiled/_next/static/chunks/app/settings/{page-8f9a85f96088c18b.js → page-95e994ddac31473f.js} +1 -1
  17. khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-b3f7ae1ef8871d30.js +1 -0
  18. khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-ed7787cf4938b8e3.js → page-c062269e6906ef22.js} +1 -1
  19. khoj/interface/compiled/_next/static/chunks/{webpack-c6e14fd89812b96f.js → webpack-c375c47fee5a4dda.js} +1 -1
  20. khoj/interface/compiled/_next/static/css/1e9b757ee2a2b34b.css +1 -0
  21. khoj/interface/compiled/_next/static/css/ee66643a6a5bf71c.css +1 -0
  22. khoj/interface/compiled/agents/index.html +2 -2
  23. khoj/interface/compiled/agents/index.txt +2 -2
  24. khoj/interface/compiled/automations/index.html +2 -2
  25. khoj/interface/compiled/automations/index.txt +3 -3
  26. khoj/interface/compiled/chat/index.html +2 -2
  27. khoj/interface/compiled/chat/index.txt +2 -2
  28. khoj/interface/compiled/index.html +2 -2
  29. khoj/interface/compiled/index.txt +2 -2
  30. khoj/interface/compiled/search/index.html +2 -2
  31. khoj/interface/compiled/search/index.txt +2 -2
  32. khoj/interface/compiled/settings/index.html +2 -2
  33. khoj/interface/compiled/settings/index.txt +4 -4
  34. khoj/interface/compiled/share/chat/index.html +2 -2
  35. khoj/interface/compiled/share/chat/index.txt +2 -2
  36. khoj/main.py +11 -1
  37. khoj/processor/conversation/utils.py +7 -7
  38. khoj/processor/operator/__init__.py +16 -1
  39. khoj/processor/tools/run_code.py +5 -2
  40. khoj/routers/api_chat.py +822 -682
  41. khoj/routers/helpers.py +101 -2
  42. khoj/routers/research.py +56 -14
  43. khoj/utils/rawconfig.py +0 -1
  44. {khoj-2.0.0b8.dev1.dist-info → khoj-2.0.0b9.dev7.dist-info}/METADATA +1 -1
  45. {khoj-2.0.0b8.dev1.dist-info → khoj-2.0.0b9.dev7.dist-info}/RECORD +56 -56
  46. khoj/interface/compiled/_next/static/chunks/5477-18323501c445315e.js +0 -1
  47. khoj/interface/compiled/_next/static/chunks/9568-0d60ac475f4cc538.js +0 -1
  48. khoj/interface/compiled/_next/static/chunks/app/agents/layout-e00fb81dca656a10.js +0 -1
  49. khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js +0 -1
  50. khoj/interface/compiled/_next/static/chunks/app/chat/page-b186e95387e23ed5.js +0 -1
  51. khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js +0 -1
  52. khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-abb6c5f4239ad7be.js +0 -1
  53. khoj/interface/compiled/_next/static/css/37a73b87f02df402.css +0 -1
  54. khoj/interface/compiled/_next/static/css/93eeacc43e261162.css +0 -1
  55. /khoj/interface/compiled/_next/static/chunks/{1327-1a9107b9a2a04a98.js → 1327-3b1a41af530fa8ee.js} +0 -0
  56. /khoj/interface/compiled/_next/static/chunks/{1915-5c6508f6ebb62a30.js → 1915-fbfe167c84ad60c5.js} +0 -0
  57. /khoj/interface/compiled/_next/static/chunks/{2117-080746c8e170c81a.js → 2117-e78b6902ad6f75ec.js} +0 -0
  58. /khoj/interface/compiled/_next/static/chunks/{2939-4af3fd24b8ffc9ad.js → 2939-4d4084c5b888b960.js} +0 -0
  59. /khoj/interface/compiled/_next/static/chunks/{4447-cd95608f8e93e711.js → 4447-d6cf93724d57e34b.js} +0 -0
  60. /khoj/interface/compiled/_next/static/chunks/{8667-50b03a89e82e0ba7.js → 8667-4b7790573b08c50d.js} +0 -0
  61. /khoj/interface/compiled/_next/static/{ZHB1va0KhWIu8Zs8-kbgt → j6hqMrHT_uO81BNrhFQkJ}/_buildManifest.js +0 -0
  62. /khoj/interface/compiled/_next/static/{ZHB1va0KhWIu8Zs8-kbgt → j6hqMrHT_uO81BNrhFQkJ}/_ssgManifest.js +0 -0
  63. {khoj-2.0.0b8.dev1.dist-info → khoj-2.0.0b9.dev7.dist-info}/WHEEL +0 -0
  64. {khoj-2.0.0b8.dev1.dist-info → khoj-2.0.0b9.dev7.dist-info}/entry_points.txt +0 -0
  65. {khoj-2.0.0b8.dev1.dist-info → khoj-2.0.0b9.dev7.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
@@ -1936,6 +1936,53 @@ 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
+
1952
+ # Remove requests outside of the time window
1953
+ cutoff = django_timezone.now() - timedelta(seconds=self.window)
1954
+ count_requests = UserRequests.objects.filter(user=user, created_at__gte=cutoff, slug=self.slug).count()
1955
+
1956
+ # Check if the user has exceeded the rate limit
1957
+ if subscribed and count_requests >= self.subscribed_requests:
1958
+ logger.info(
1959
+ f"Rate limit: {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for subscribed user: {user}."
1960
+ )
1961
+ raise HTTPException(
1962
+ status_code=429,
1963
+ detail="I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. But let's chat more tomorrow?",
1964
+ )
1965
+ if not subscribed and count_requests >= self.requests:
1966
+ if self.requests >= self.subscribed_requests:
1967
+ logger.info(
1968
+ f"Rate limit: {count_requests}/{self.subscribed_requests} requests not allowed in {self.window} seconds for user: {user}."
1969
+ )
1970
+ raise HTTPException(
1971
+ status_code=429,
1972
+ detail="I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. But let's chat more tomorrow?",
1973
+ )
1974
+
1975
+ logger.info(
1976
+ f"Rate limit: {count_requests}/{self.requests} requests not allowed in {self.window} seconds for user: {user}."
1977
+ )
1978
+ raise HTTPException(
1979
+ status_code=429,
1980
+ detail="I'm glad you're enjoying interacting with me! You've unfortunately exceeded your usage limit for today. You can subscribe to increase your usage limit via [your settings](https://app.khoj.dev/settings) or we can continue our conversation tomorrow?",
1981
+ )
1982
+
1983
+ # Add the current request to the cache
1984
+ UserRequests.objects.create(user=user, slug=self.slug)
1985
+
1939
1986
 
1940
1987
  class ApiImageRateLimiter:
1941
1988
  def __init__(self, max_images: int = 10, max_combined_size_mb: float = 10):
@@ -1983,6 +2030,47 @@ class ApiImageRateLimiter:
1983
2030
  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
2031
  )
1985
2032
 
2033
+ def check_websocket(self, websocket: WebSocket, body: ChatRequestBody):
2034
+ """WebSocket-specific image rate limiting method"""
2035
+ if state.billing_enabled is False:
2036
+ return
2037
+
2038
+ # Rate limiting is disabled if user unauthenticated.
2039
+ if not websocket.scope.get("user") or not websocket.scope["user"].is_authenticated:
2040
+ return
2041
+
2042
+ if not body.images:
2043
+ return
2044
+
2045
+ # Check number of images
2046
+ if len(body.images) > self.max_images:
2047
+ logger.info(f"Rate limit: {len(body.images)}/{self.max_images} images not allowed per message.")
2048
+ raise HTTPException(
2049
+ status_code=429,
2050
+ detail=f"Those are way too many images for me! I can handle up to {self.max_images} images per message.",
2051
+ )
2052
+
2053
+ # Check total size of images
2054
+ total_size_mb = 0.0
2055
+ for image in body.images:
2056
+ # Unquote the image in case it's URL encoded
2057
+ image = unquote(image)
2058
+ # Assuming the image is a base64 encoded string
2059
+ # Remove the data:image/jpeg;base64, part if present
2060
+ if "," in image:
2061
+ image = image.split(",", 1)[1]
2062
+
2063
+ # Decode base64 to get the actual size
2064
+ image_bytes = base64.b64decode(image)
2065
+ total_size_mb += len(image_bytes) / (1024 * 1024) # Convert bytes to MB
2066
+
2067
+ if total_size_mb > self.max_combined_size_mb:
2068
+ logger.info(f"Data limit: {total_size_mb}MB/{self.max_combined_size_mb}MB size not allowed per message.")
2069
+ raise HTTPException(
2070
+ status_code=429,
2071
+ 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.",
2072
+ )
2073
+
1986
2074
 
1987
2075
  class ConversationCommandRateLimiter:
1988
2076
  def __init__(self, trial_rate_limit: int, subscribed_rate_limit: int, slug: str):
@@ -1991,7 +2079,7 @@ class ConversationCommandRateLimiter:
1991
2079
  self.subscribed_rate_limit = subscribed_rate_limit
1992
2080
  self.restricted_commands = [ConversationCommand.Research]
1993
2081
 
1994
- async def update_and_check_if_valid(self, request: Request, conversation_command: ConversationCommand):
2082
+ async def update_and_check_if_valid(self, request: Request | WebSocket, conversation_command: ConversationCommand):
1995
2083
  if state.billing_enabled is False:
1996
2084
  return
1997
2085
 
@@ -2512,6 +2600,17 @@ async def read_chat_stream(response_iterator: AsyncGenerator[str, None]) -> Dict
2512
2600
  }
2513
2601
 
2514
2602
 
2603
+ def get_message_from_queue(queue: asyncio.Queue) -> Optional[str]:
2604
+ """Get any message in queue if available."""
2605
+ if not queue:
2606
+ return None
2607
+ try:
2608
+ # Non-blocking check for message in the queue
2609
+ return queue.get_nowait()
2610
+ except asyncio.QueueEmpty:
2611
+ return None
2612
+
2613
+
2515
2614
  def get_user_config(user: KhojUser, request: Request, is_detailed: bool = False):
2516
2615
  user_picture = request.session.get("user", {}).get("picture")
2517
2616
  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,
@@ -58,7 +60,7 @@ async def apick_next_tool(
58
60
  query_files: str = None,
59
61
  max_document_searches: int = 7,
60
62
  max_online_searches: int = 3,
61
- max_webpages_to_read: int = 1,
63
+ max_webpages_to_read: int = 3,
62
64
  send_status_func: Optional[Callable] = None,
63
65
  tracer: dict = {},
64
66
  ):
@@ -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,
@@ -86,25 +88,40 @@ async def apick_next_tool(
86
88
  # Construct tool options for the agent to choose from
87
89
  tools = []
88
90
  tool_options_str = ""
89
- agent_tools = agent.input_tools if agent else []
91
+ agent_input_tools = agent.input_tools if agent else []
92
+ agent_tools = []
93
+
94
+ # Map agent user facing tools to research tools to include in agents toolbox
95
+ document_research_tools = [
96
+ ConversationCommand.SemanticSearchFiles,
97
+ ConversationCommand.RegexSearchFiles,
98
+ ConversationCommand.ViewFile,
99
+ ConversationCommand.ListFiles,
100
+ ]
101
+ input_tools_to_research_tools = {
102
+ ConversationCommand.Notes.value: [tool.value for tool in document_research_tools],
103
+ ConversationCommand.Webpage.value: [ConversationCommand.ReadWebpage.value],
104
+ ConversationCommand.Online.value: [ConversationCommand.SearchWeb.value],
105
+ ConversationCommand.Code.value: [ConversationCommand.RunCode.value],
106
+ ConversationCommand.Operator.value: [ConversationCommand.OperateComputer.value],
107
+ }
108
+ for input_tool, research_tools in input_tools_to_research_tools.items():
109
+ if input_tool in agent_input_tools:
110
+ agent_tools += research_tools
111
+
90
112
  user_has_entries = await EntryAdapters.auser_has_entries(user)
91
113
  for tool, tool_data in tools_for_research_llm.items():
92
114
  # Skip showing operator tool as an option if not enabled
93
- if tool == ConversationCommand.Operator and not is_operator_enabled():
115
+ if tool == ConversationCommand.OperateComputer and not is_operator_enabled():
94
116
  continue
95
117
  # Skip showing document related tools if user has no documents
96
- if (
97
- tool == ConversationCommand.SemanticSearchFiles
98
- or tool == ConversationCommand.RegexSearchFiles
99
- or tool == ConversationCommand.ViewFile
100
- or tool == ConversationCommand.ListFiles
101
- ) and not user_has_entries:
118
+ if tool in document_research_tools and not user_has_entries:
102
119
  continue
103
120
  if tool == ConversationCommand.SemanticSearchFiles:
104
121
  description = tool_data.description.format(max_search_queries=max_document_searches)
105
- elif tool == ConversationCommand.Webpage:
122
+ elif tool == ConversationCommand.ReadWebpage:
106
123
  description = tool_data.description.format(max_webpages_to_read=max_webpages_to_read)
107
- elif tool == ConversationCommand.Online:
124
+ elif tool == ConversationCommand.SearchWeb:
108
125
  description = tool_data.description.format(max_search_queries=max_online_searches)
109
126
  else:
110
127
  description = tool_data.description
@@ -206,6 +223,8 @@ async def research(
206
223
  tracer: dict = {},
207
224
  query_files: str = None,
208
225
  cancellation_event: Optional[asyncio.Event] = None,
226
+ interrupt_queue: Optional[asyncio.Queue] = None,
227
+ abort_message: str = "␃🔚␗",
209
228
  ):
210
229
  max_document_searches = 7
211
230
  max_online_searches = 3
@@ -226,6 +245,26 @@ async def research(
226
245
  logger.debug(f"Research cancelled. User {user} disconnected client.")
227
246
  break
228
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 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
+
229
268
  online_results: Dict = dict()
230
269
  code_results: Dict = dict()
231
270
  document_results: List[Dict[str, str]] = []
@@ -321,7 +360,9 @@ async def research(
321
360
  try:
322
361
  async for result in search_online(
323
362
  **this_iteration.query.args,
324
- conversation_history=construct_tool_chat_history(previous_iterations, ConversationCommand.Online),
363
+ conversation_history=construct_tool_chat_history(
364
+ previous_iterations, ConversationCommand.SearchWeb
365
+ ),
325
366
  location=location,
326
367
  user=user,
327
368
  send_status_func=send_status_func,
@@ -377,7 +418,7 @@ async def research(
377
418
  try:
378
419
  async for result in run_code(
379
420
  **this_iteration.query.args,
380
- conversation_history=construct_tool_chat_history(previous_iterations, ConversationCommand.Code),
421
+ conversation_history=construct_tool_chat_history(previous_iterations, ConversationCommand.RunCode),
381
422
  context="",
382
423
  location_data=location,
383
424
  user=user,
@@ -411,6 +452,7 @@ async def research(
411
452
  agent=agent,
412
453
  query_files=query_files,
413
454
  cancellation_event=cancellation_event,
455
+ interrupt_queue=interrupt_queue,
414
456
  tracer=tracer,
415
457
  ):
416
458
  if isinstance(result, dict) and ChatEvent.STATUS in result:
khoj/utils/rawconfig.py CHANGED
@@ -168,7 +168,6 @@ class ChatRequestBody(BaseModel):
168
168
  images: Optional[list[str]] = None
169
169
  files: Optional[list[FileAttachment]] = []
170
170
  create_new: Optional[bool] = False
171
- interrupt: Optional[bool] = False
172
171
 
173
172
 
174
173
  class Entry:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: khoj
3
- Version: 2.0.0b8.dev1
3
+ Version: 2.0.0b9.dev7
4
4
  Summary: Your Second Brain
5
5
  Project-URL: Homepage, https://khoj.dev
6
6
  Project-URL: Documentation, https://docs.khoj.dev
@@ -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=IGqt13JZoGLWYsSWM8bv-ChJSEFJwpN1zL5bX3GhIOo,8638
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=b1PZyRqnlJrVqaB98ChsiW7ajrFoJXpE4rEZ5BoXNt8,83018
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,40 @@ 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=1LyF9X3vSGrlowBM4fT312OzLwjcux1igFzXlwNQq98,31816
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=fnWq3I0P_8ezYV-Rlz0uR-p0Ix7dC7hVkhRCKh7Qin8,53350
135
- khoj/interface/compiled/index.txt,sha256=QSJq2Xk5puLjKdxhzvfwdPEAA-4072PhQL-jS8XePPU,7747
134
+ khoj/interface/compiled/index.html,sha256=JLYbRdp3JO4aJV5gxj7g3bF02W9O3iqZxiJJlZIPMj0,53660
135
+ khoj/interface/compiled/index.txt,sha256=JUYz58usCdCyGWPvmwGqyfn2os4RbwaIgENASnDSDBY,7880
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=oqTe-Wt35WK5db9eIHc4_k_B_FiE4qaiYj4J4l0gUCU,17407
143
- khoj/interface/compiled/_next/static/ZHB1va0KhWIu8Zs8-kbgt/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
144
- khoj/interface/compiled/_next/static/ZHB1va0KhWIu8Zs8-kbgt/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
142
+ khoj/interface/compiled/404/index.html,sha256=OH1_vwUay55fnoUcEPp39yhjOeslQ0gOIMT6qwhE-9E,17407
145
143
  khoj/interface/compiled/_next/static/chunks/1191.b547ec13349b4aed.js,sha256=3qtdOft2SSaGT0qhyPunEraJEZUxIqDV4q3ULnFantg,10913
146
- khoj/interface/compiled/_next/static/chunks/1327-1a9107b9a2a04a98.js,sha256=7NmSOycXRGHpTN98sMAirnWN8ZUL971FsQpWmOs4Fxs,442974
144
+ khoj/interface/compiled/_next/static/chunks/1327-3b1a41af530fa8ee.js,sha256=7NmSOycXRGHpTN98sMAirnWN8ZUL971FsQpWmOs4Fxs,442974
147
145
  khoj/interface/compiled/_next/static/chunks/1588.f0558a0bdffc4761.js,sha256=ZSpLe7ui7FG7AvK00JHPg1YjYz8R9l1Obzu1mYHpzjo,89845
148
- khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js,sha256=qP_naVeN_Vqu4o2bOYGBoDEYCFVDphWwLqa_3_WeYjU,11294
146
+ khoj/interface/compiled/_next/static/chunks/1915-fbfe167c84ad60c5.js,sha256=qP_naVeN_Vqu4o2bOYGBoDEYCFVDphWwLqa_3_WeYjU,11294
149
147
  khoj/interface/compiled/_next/static/chunks/1918.925cb4a35518d258.js,sha256=WWqQcBDm9KEZUpj0P9p-iiVxoVjnM4PGtAyQXGAZ4yo,6088
150
- khoj/interface/compiled/_next/static/chunks/2117-080746c8e170c81a.js,sha256=yOBtQrL5NRMjI60r4pmZRRTHZv8_xwZm4DQp-RI8H9M,123994
148
+ khoj/interface/compiled/_next/static/chunks/2117-e78b6902ad6f75ec.js,sha256=yOBtQrL5NRMjI60r4pmZRRTHZv8_xwZm4DQp-RI8H9M,123994
151
149
  khoj/interface/compiled/_next/static/chunks/2242.9a07e19f1a3a8b16.js,sha256=gE2wenv7eMCWo8FlC8uOffniVrbcSyi2BfpoDygPJbQ,6535
152
- khoj/interface/compiled/_next/static/chunks/2327-d863b0b21ecb23de.js,sha256=YnTF2ERjtMojL6qsi2RH0ljW0_xDnvjDE_N8IL5mF8M,127516
150
+ khoj/interface/compiled/_next/static/chunks/2327-ea623ca2d22f78e9.js,sha256=Cwaj5_kmqMRmZH2CdtZG5T5dvdyBL8fL2HrpY4jfLCI,127516
153
151
  khoj/interface/compiled/_next/static/chunks/2612.bcf5a623b3da209e.js,sha256=_odabGQTNjtpFLdU6FmDdC9zZQkYKJOs8_8QVgMJmEI,76988
154
152
  khoj/interface/compiled/_next/static/chunks/2849.dc00ae5ba7219cfc.js,sha256=cVUiYRj2GweNQ4unKpJIhdr_xO5s2hRy3UWK-81rZW8,182
155
- khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js,sha256=8BI0oAQSZQj37UZX_igaTvuTgW0nGvVtvyG9G9byr_k,35749
153
+ khoj/interface/compiled/_next/static/chunks/2939-4d4084c5b888b960.js,sha256=8BI0oAQSZQj37UZX_igaTvuTgW0nGvVtvyG9G9byr_k,35749
156
154
  khoj/interface/compiled/_next/static/chunks/303.fe76de943e930fbd.js,sha256=gvkmkEYSLe4Iy-8Ti4Ty_OYjkHyrIpgUnfuoQSX577g,178
157
155
  khoj/interface/compiled/_next/static/chunks/3265.924139c4146ee344.js,sha256=O0nwy9HzDY8Df66o72--Lw9RguS5Mh4ExT-uBxdRUbA,636
158
156
  khoj/interface/compiled/_next/static/chunks/3489.c523fe96a2eee74f.js,sha256=s2F6I_29rsqcu-8229-nssfws7vZO7cuQJYqehK7tbk,21715
159
157
  khoj/interface/compiled/_next/static/chunks/3592-b2a2444b0ec7b119.js,sha256=ADfFNp0QHqmz0sHmTSpE-hWnh09AxVVzZb6zcx_ATmg,42200
160
158
  khoj/interface/compiled/_next/static/chunks/3595-ac8e81e04ecb89cb.js,sha256=43eYa6m0ZuFnnBOPTa6S-T0WeLftHEZDlkMe4b7fmIA,21564
161
159
  khoj/interface/compiled/_next/static/chunks/4327.8d2a1b8f1ea78208.js,sha256=VKeC1Y6778Nlt-spX9W9dL8Ex-d2N5AEj53AOVUXGWE,322147
162
- khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js,sha256=PUldPCrWRAgi5rxqTzWS1boopyuyAQpzzBg-p4TQnNw,19716
160
+ khoj/interface/compiled/_next/static/chunks/4447-d6cf93724d57e34b.js,sha256=PUldPCrWRAgi5rxqTzWS1boopyuyAQpzzBg-p4TQnNw,19716
163
161
  khoj/interface/compiled/_next/static/chunks/4533.586e74b45a2bde25.js,sha256=eDHOyGa-CuCVeyXtnx3YWmjvlpWveAj6Mu-bMlm3OJg,25567
164
162
  khoj/interface/compiled/_next/static/chunks/4551.82ce1476b5516bc2.js,sha256=G1EoTZRkMLtwYqsLCyQ9iA_9nvi8oj7_t3qboNWtdfY,71097
165
163
  khoj/interface/compiled/_next/static/chunks/4609-33aa487dff03a9fd.js,sha256=1M6QAfVZa2g2Q4jXRdSI1wjrZ4G9yKjINJt8qyTKm1A,24698
@@ -170,9 +168,9 @@ khoj/interface/compiled/_next/static/chunks/5210.cd35a1c1ec594a20.js,sha256=sz7i
170
168
  khoj/interface/compiled/_next/static/chunks/5303-c65c9c6aeb263a0d.js,sha256=M3E1iLGUW0xbsmV6JMVQBNFlptBYWK8fhfYQattqRXw,143857
171
169
  khoj/interface/compiled/_next/static/chunks/5329.f8b3c5b3d16159cd.js,sha256=452Bf2U_iLUeM0vZce-s1k75k_osL4kVm7uG72xPER8,418
172
170
  khoj/interface/compiled/_next/static/chunks/5427-13d6ffd380fdfab7.js,sha256=gGx3O30h-Rb3MDqcMeD3wmOZnauuOIkz4Cv-NnVEjIE,32619
173
- khoj/interface/compiled/_next/static/chunks/5477-18323501c445315e.js,sha256=LFubirJCnLYJ0yoo6pEx1P42_jRjj1JsZX4akdVmjew,14599
171
+ khoj/interface/compiled/_next/static/chunks/5477-c4209b72942d3038.js,sha256=LkXuXSSFpmu1ZZUR2ZdV9b6aFHQUb4krBJjf5aeUI0k,14624
174
172
  khoj/interface/compiled/_next/static/chunks/558-c14e76cff03f6a60.js,sha256=8fgZkhFBwG3NfWM3P65XkA7ffRg3vDEhwjyiWLiXMBg,87244
175
- khoj/interface/compiled/_next/static/chunks/5639-0c4604668cb2d4c0.js,sha256=FUVuhw9Ys2-PiZB3vOfCadzej3ptFqnOij_WOMOVnY8,1635449
173
+ khoj/interface/compiled/_next/static/chunks/5639-09e2009a2adedf8b.js,sha256=GCw1uURL3cSixZZf0mf_4rRpTj0-law3ww4MBk9OC78,1635449
176
174
  khoj/interface/compiled/_next/static/chunks/5830.8876eccb82da9b7d.js,sha256=JRJTpsXUOOcNum5Vx6qd0mAGcts6WLOiLpLkPHK5QHQ,42176
177
175
  khoj/interface/compiled/_next/static/chunks/6230.88a71d8145347b3f.js,sha256=YhcKpzA0q12f9fJ5y5cBC3OMEDi5CtKedyppboP31u8,418
178
176
  khoj/interface/compiled/_next/static/chunks/6434.e6cd986d690f2cef.js,sha256=fVR1V4ENz1Qeebsoe8N8XNVbcwGBBhdnTJY-157Y0sg,36261
@@ -185,13 +183,14 @@ khoj/interface/compiled/_next/static/chunks/7760.35649cc21d9585bd.js,sha256=MJ9q
185
183
  khoj/interface/compiled/_next/static/chunks/83.48e2db193a940052.js,sha256=j8X0kemaNExxw4lDZCgkev1HeK37NM_kE6p73WuHjs8,175
186
184
  khoj/interface/compiled/_next/static/chunks/8427.844694e06133fb51.js,sha256=U388feyx6dj6PZblInnwOgAKlPg1f2Vp-oCFhh2SiXY,186
187
185
  khoj/interface/compiled/_next/static/chunks/8665.4db7e6b2e8933497.js,sha256=HovLNJSM0SJRkjLNg0cim_NDnGiVPbUrEQG8YQkGA2Y,45791
188
- khoj/interface/compiled/_next/static/chunks/8667-50b03a89e82e0ba7.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
186
+ khoj/interface/compiled/_next/static/chunks/8667-4b7790573b08c50d.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
189
187
  khoj/interface/compiled/_next/static/chunks/8694.2bd9c2f65d8c5847.js,sha256=JKqMqrtPf1LK-SmVgLk_F8EjAC6IGKl4lnfWU6q4JXA,33661
190
188
  khoj/interface/compiled/_next/static/chunks/872.caf84cc1a39ae59f.js,sha256=xdPZDnCGiugQ4JwV1FzzYyBEvuXQLOqSw_cMbOJKjtw,11253
191
189
  khoj/interface/compiled/_next/static/chunks/8888.ebe0e552b59e7fed.js,sha256=c5icsYFTx7epn588gtjfP9lKKMdINc07w1P7t56ac8E,3775
192
190
  khoj/interface/compiled/_next/static/chunks/8890.6e8a59e4de6978bc.js,sha256=UgHpyhvA3s1knHgPf3oPgvJ6bqStNOv-6uhQUHBtOGE,36317
193
191
  khoj/interface/compiled/_next/static/chunks/8950.5f2272e0ac923f9e.js,sha256=pxyd8W7Yv79gp8mslLSR_We6gpJOc-JoNkRbM7rgZ94,412
194
192
  khoj/interface/compiled/_next/static/chunks/90542734.2c21f16f18b22411.js,sha256=mFFt4YDMnvCB84YuPgH0V6wX9UvHwoztnhHgL6cad-g,426479
193
+ khoj/interface/compiled/_next/static/chunks/9139-ce1ae935dac9c871.js,sha256=uwVs14McY01hs1lkHG2t8Z_z2EC11NConM1NJPuMXbc,48934
195
194
  khoj/interface/compiled/_next/static/chunks/9202.c703864fcedc8d1f.js,sha256=q728YuRC6vTO64ARqaguEZH6Udhdu6IU3rDGmfdtN6I,24367
196
195
  khoj/interface/compiled/_next/static/chunks/9245.a04e92d034540234.js,sha256=NH1VEr8vi6CkKDFpPgGimz2jfNwpoE4AUFQ86SKmRwg,145680
197
196
  khoj/interface/compiled/_next/static/chunks/9320.6aca4885d541aa44.js,sha256=mMJG3Ncy8a0GVDZPNPan_vWjjYTrr6R8PRFHo1MAXBI,4207
@@ -199,7 +198,6 @@ khoj/interface/compiled/_next/static/chunks/945-74376499b067d28e.js,sha256=e_lXz
199
198
  khoj/interface/compiled/_next/static/chunks/94ca1967.1b3402358e0e1255.js,sha256=WJXEIy24FD6PNQePg-uahendJMNc03GgnVveitFeshI,1174524
200
199
  khoj/interface/compiled/_next/static/chunks/9535.f78cd92d03331e55.js,sha256=nr2CB4ZZ2hZInusLxQMZGBad68a-3Imn3UDSwAe-WKs,178
201
200
  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
201
  khoj/interface/compiled/_next/static/chunks/964ecbae.d5be7c49c320d695.js,sha256=Dp7-5a_bYiET4lBiy1sTrb1cQnE3_TC0f1EQCD2Coko,1175124
204
202
  khoj/interface/compiled/_next/static/chunks/9968.b111fc002796da81.js,sha256=uaKF_VIHPSnjwK6NPXwWaolJo_1d-E43rADivNbk4RA,180
205
203
  khoj/interface/compiled/_next/static/chunks/d3ac728e-4c56e7f41db266b7.js,sha256=KH2S98yagVOcqDG836x8mxIFFjrq11AdYodjBurPvmg,268514
@@ -209,33 +207,35 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
209
207
  khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
210
208
  khoj/interface/compiled/_next/static/chunks/main-fc8e0fefa2ef3d8c.js,sha256=t9FZIByh6V52m41LQ2yyAReF1CAuY7gLMBuWBeKCX2g,116793
211
209
  khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
212
- khoj/interface/compiled/_next/static/chunks/webpack-c6e14fd89812b96f.js,sha256=mQrPrPYGQas-sR94QKduyO9pnvOEkayRvrfZacczP-Y,4951
210
+ khoj/interface/compiled/_next/static/chunks/webpack-c375c47fee5a4dda.js,sha256=k2Hu9f0QYVkAxTks6uqlFsni1ctxZj0FWPAqtiQANjw,4951
213
211
  khoj/interface/compiled/_next/static/chunks/app/layout-c2de87a25fededbb.js,sha256=jcU3C37p73V24B118uVRQffNaQES9jihsTGYF4fZ_8o,3949
214
- khoj/interface/compiled/_next/static/chunks/app/page-a19a597629e87fb8.js,sha256=lfXNkiSiwMKG1q3y0S3MUUsvQNznDHtfpwVKtx38gLk,29930
212
+ khoj/interface/compiled/_next/static/chunks/app/page-85b9b416898738f7.js,sha256=nmB2Y8B2kX88X2yiH6Un8L0REBEn3Ar2iOoe3TK7dJw,29935
215
213
  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-e00fb81dca656a10.js,sha256=Prg_1BSPDnJDTXEx-Ai9RtlK0nesPWDFIVFFCMuVUiw,180
217
- khoj/interface/compiled/_next/static/chunks/app/agents/page-5db6ad18da10d353.js,sha256=zUXTmNbpn0tA_IWn0vSzHWn6GLRW8AAGS6Fa-07bdwY,17483
214
+ khoj/interface/compiled/_next/static/chunks/app/agents/layout-4e2a134ec26aa606.js,sha256=B3HJ6CKzJccEIOk54Erl1FtKUxGJq2p-ch932X1vjwE,180
215
+ khoj/interface/compiled/_next/static/chunks/app/agents/page-0006674668eb5a4d.js,sha256=JZZS6jOjzfVYE6E76Fl0iou8Jc_1T_-PzPh6rCAYOjY,17488
218
216
  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-6271e2e31c7571d1.js,sha256=vOD3YLeKBh_M6ZLtlW4m4fbi2YJf5qyo60251kIMtX8,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-b186e95387e23ed5.js,sha256=4t2MEuIW-Wsv9yCusRVjQdygp_wfAyDd0z3W5s73kU0,29350
222
- khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js,sha256=Bm4Y73ylR-j9_LdKXVUjgLppZJ6JRdLTUgYAsZCOBkQ,180
223
- khoj/interface/compiled/_next/static/chunks/app/search/page-fa366ac14b228688.js,sha256=vdwyjWiRZD2Q6pe2-5K0nZzK7JCGf9tSK1JqbL73X6w,30929
217
+ khoj/interface/compiled/_next/static/chunks/app/automations/page-4c465cde2d14cb52.js,sha256=X--w9ZCke8H6d-oGLF97ihEA3E5_lIusQlwDeb80CMI,34834
218
+ khoj/interface/compiled/_next/static/chunks/app/chat/layout-d6acbba22ccac0ff.js,sha256=mqE48lzQOL2jdwqhCf_GMnt6gEt2nX8VxbwF4WFD2TI,180
219
+ khoj/interface/compiled/_next/static/chunks/app/chat/page-4408125f66c165cf.js,sha256=M6okICNevJb7092Qs0BYvG6KcNX5xKXtaIZ_DwR5hIA,29313
220
+ khoj/interface/compiled/_next/static/chunks/app/search/layout-484d34239ed0f2b1.js,sha256=L7gJxQXczJP6c7e8t24p_RirmegDRuyJRiGQg364TM4,180
221
+ khoj/interface/compiled/_next/static/chunks/app/search/page-883b7d8d2e3abe3e.js,sha256=GCSw4fBzRPRnj9YKz1lwEpVbwwOfWmp8p3n-jDeTGGk,30929
224
222
  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-8f9a85f96088c18b.js,sha256=g0S5cRFSD0mkplsB5LuU6bi3pe-CEVwmhNuHB14mx3s,27892
226
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-abb6c5f4239ad7be.js,sha256=_HdxnZ70IoB5eHZ5e__Z0jt-2ElBo_BsNPboM-2SMLg,180
227
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-ed7787cf4938b8e3.js,sha256=jWx4PswoIgW3jA1NxhI-1oKh_ZcVq-E8ZnqFc3PbHJI,5563
223
+ khoj/interface/compiled/_next/static/chunks/app/settings/page-95e994ddac31473f.js,sha256=bUMhd4ALsGVOaMrH-n0wxsDNtAmaZvMaQbK_K9C-Osk,27897
224
+ khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-b3f7ae1ef8871d30.js,sha256=JsEyiIoEsN1WLgEjun_x908uUc85ve2k3cNY4YF2yyw,180
225
+ khoj/interface/compiled/_next/static/chunks/app/share/chat/page-c062269e6906ef22.js,sha256=LPSBHopvAhYz9BXWDq0H8Tw927QYMQQNQ9NSPV3dZ64,5568
228
226
  khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js,sha256=UqtikLsCsOWtDUJOW6Tuk9P-bV1V3MhYd3ghrQuEmfs,286
229
227
  khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js,sha256=w_It3VzKT8O1M3CrJ_hZHsaU7M7dq3EAaVG8KvJ-fhU,253
228
+ khoj/interface/compiled/_next/static/css/1e9b757ee2a2b34b.css,sha256=9TB4U1wbKtOA-SphUhahi-6WeepK7lOWRKvX3bJW2C0,6795
230
229
  khoj/interface/compiled/_next/static/css/3090706713c12a32.css,sha256=lHBNcr2SPiAMdZQONh2MMlVM_huteuNSM9jCqGkS2d0,3075782
231
- khoj/interface/compiled/_next/static/css/37a73b87f02df402.css,sha256=hp0vlekKu0K2eITR5YIqFmLHQPqV3JETFnRd_-Uh0mk,165
232
230
  khoj/interface/compiled/_next/static/css/5b28ced915454767.css,sha256=Bk56AIRHovIWNUw8QWvMbXIxxPiyWEiObkMA7RwpMrs,4842
233
231
  khoj/interface/compiled/_next/static/css/76c658ee459140a9.css,sha256=7tI24VB66ZUsAPUxRdQhboopun0AXLUnF64uv9RkC08,1833
234
232
  khoj/interface/compiled/_next/static/css/7889a30fe9c83846.css,sha256=IUkZhkx4GpYOIhN-EJw9T1DqGMO3Wa3mNpUwaOBuZoY,7204
235
- khoj/interface/compiled/_next/static/css/93eeacc43e261162.css,sha256=rbrg1ppryE0iLWmJexa3Qibtrb6gegftRjKIIMpnR2s,9736
236
233
  khoj/interface/compiled/_next/static/css/a0c2fd63bb396f04.css,sha256=8q0xBA3l7uP-YOqSnRnQEfPbGUgP9xRP0Q75UHSt6vc,34737
237
234
  khoj/interface/compiled/_next/static/css/db7d90554f3ab82b.css,sha256=A3ZAf0StEG3sr_LxAIizczSTYRe1NbtNUpfslvmkqgk,17713
238
235
  khoj/interface/compiled/_next/static/css/ea5485b3f3859a5a.css,sha256=tn6qi2xSLTWhtzDUE8UlC8iipH9QGV6A9oGj1ap-Sk4,1659
236
+ khoj/interface/compiled/_next/static/css/ee66643a6a5bf71c.css,sha256=3JbJLrnwlX_IHdvjmS3l9y3Vgp5_V0XbfFI44ekLh9E,3106
237
+ khoj/interface/compiled/_next/static/j6hqMrHT_uO81BNrhFQkJ/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
238
+ khoj/interface/compiled/_next/static/j6hqMrHT_uO81BNrhFQkJ/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
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=tBKiFOskgMSBoMNlPLdiOxGLsL6T7uHpwBXlDEeNt5Y,16532
317
- khoj/interface/compiled/agents/index.txt,sha256=NWtSuM2mwXYxUj-1WV8OYIc6kGm4SHT0UGQ9YGcZK4I,7351
316
+ khoj/interface/compiled/agents/index.html,sha256=tNdCQgA-SiCvpAFXV4fKOtC0tDdiTFO7zrAMUSnWMGA,16842
317
+ khoj/interface/compiled/agents/index.txt,sha256=cNSKn87l4eF05y9Cn8Q8K0wLPL8pI1exMT0b-huaP1g,7484
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=mQ7m_xS8O2pdDI4acENfi2uHb63OQM-Gts0S0pm1B1E,54402
333
- khoj/interface/compiled/automations/index.txt,sha256=6TwZspnajbhorwjzksOIePtj0DebwrgVw4ucgAb6ZEQ,7580
334
- khoj/interface/compiled/chat/index.html,sha256=Jc6uwNdRYQAaGLilt3TSrGzZPOXaInwzRiU_aB3qfhI,53532
335
- khoj/interface/compiled/chat/index.txt,sha256=fl7UJ5ojWRknqCiZvrgF1KgfBpLoINRJW2ZYlYRXxzM,7991
336
- khoj/interface/compiled/search/index.html,sha256=_VzhQ-vl-NHrDpYMbHgBPPAYkCqRbJxftILP50Ijajk,55611
337
- khoj/interface/compiled/search/index.txt,sha256=PUWT3XPC0I3fkkEPoe6b7U6-7Fqd3b0iIBXq6FevDBM,6698
338
- khoj/interface/compiled/settings/index.html,sha256=dhOQzK3NrqJYAnqzZBbhAhgQ-hoFyVY8BHkprGqIjS4,53050
339
- khoj/interface/compiled/settings/index.txt,sha256=WA7aiOIVFLXE4UNV1ybGsf2kArBNrzoAT94KheOvvsI,7834
340
- khoj/interface/compiled/share/chat/index.html,sha256=OV2RVwdMjyU2qrCruFRJgVhY81IJgEQQozs2YkrgQPk,54112
341
- khoj/interface/compiled/share/chat/index.txt,sha256=zRO0bVOiN6gLEauhqyhLUL7nuNIrYez7O9PumiNgqGo,8453
332
+ khoj/interface/compiled/automations/index.html,sha256=2BMWrEPcvINauotGjxpW9b-4ujXdNZ3R9SWJi3dvN3w,54712
333
+ khoj/interface/compiled/automations/index.txt,sha256=RLXlGcb4JrrdCDwfLl5ZA8PGCeECYa0uFYDbfDo_vCY,7713
334
+ khoj/interface/compiled/chat/index.html,sha256=bgUWggssp-BPozNorfcSiTKYZ3DbQz3ZdVX1E6-KfVw,53842
335
+ khoj/interface/compiled/chat/index.txt,sha256=RTbYywqYx3hnRLzPYVo9kNJ1HLDRUwR5Y1ZXT52iP70,8124
336
+ khoj/interface/compiled/search/index.html,sha256=te8bp7We95ebCHV0Rogu1tY9w4iDiB6tDQe3-OSz6Ow,55611
337
+ khoj/interface/compiled/search/index.txt,sha256=kKpzmvN2Qx4TTnR2AjngS587Pvb470RpMeaqZHY1-gc,6698
338
+ khoj/interface/compiled/settings/index.html,sha256=_9J79gOBEEKXGmM1ldgNeCuYR5NnVff2sZPy8lnqWV0,53360
339
+ khoj/interface/compiled/settings/index.txt,sha256=s9G6dh1AxgaMt_m487D_wXWU6V7C5-cOWwfIPDkV2CY,7967
340
+ khoj/interface/compiled/share/chat/index.html,sha256=wS0k8Nqtbdv92JfirtLr9tKfEL7zmzJvCXhfMuXvYnU,54422
341
+ khoj/interface/compiled/share/chat/index.txt,sha256=0fMiVtr11NVso_Yc1sLhZR0pYZ8EaVL7xGcr8j_9dNo,8586
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=c2-tZqsC5dWbUQVSbYmWZ6Ple7KKF8YZFZ_uKUHePiA,48631
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=ZdB1LfYBGiKC7Zrd97jRkMuGfCDJpyb2uwHY9zk8ap4,10198
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
@@ -423,21 +423,21 @@ khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
423
423
  khoj/processor/speech/text_to_speech.py,sha256=Q7sapi5Hv6woXOumtrGqR0t6izZrFBkWXFOGrHM6dJ4,1929
424
424
  khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
425
425
  khoj/processor/tools/online_search.py,sha256=JWliYq_IT5EVFk24qo6GWvXuVL5enpSHJQtlmdlrFAc,25976
426
- khoj/processor/tools/run_code.py,sha256=cyuCz61FYPWChuDwxoZHih-kAuC3J4GbL92dV4pOh6Q,12518
426
+ khoj/processor/tools/run_code.py,sha256=Olsy6TL-CdZhugSLrvjWmSNcsT58dUcJTlBQ2hhFl2o,12667
427
427
  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=wvmzmOni1vTslOtXUcITQ62OJhO25U_Y6YhyMmYugNI,58970
431
+ khoj/routers/api_chat.py,sha256=wrWjUiFqmrJgnkyOqVolsS9JGnVwbj2yDZHt-qzYeI4,62210
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=mwRiVdmJ9A1blkwFlohrFq8Mm09wL9yox10urTbLZuo,116467
438
+ khoj/routers/helpers.py,sha256=P2LfulomKWV47PE79-wMeD33bBXwq5I03OzbT7DStdo,121091
439
439
  khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
440
- khoj/routers/research.py,sha256=GPQJhqpAdmPtcN2gtxzVbDPVQqPg9DqeWPIYF8CZf3s,24197
440
+ khoj/routers/research.py,sha256=b5u7rSV5vPnnIFI3T6HQlgEM4Ra1s9WnnyppVe6XPvg,26364
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=U8tOr7FPPzn0h-oyK_8Wqlp2ZrnxpFp44iifcTbltqs,5444
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.0b8.dev1.dist-info/METADATA,sha256=3f1BISMbVv9llfOwrK0goNvCL3Axc2QwF-WZ71jb3vw,8973
464
- khoj-2.0.0b8.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
465
- khoj-2.0.0b8.dev1.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
466
- khoj-2.0.0b8.dev1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
467
- khoj-2.0.0b8.dev1.dist-info/RECORD,,
463
+ khoj-2.0.0b9.dev7.dist-info/METADATA,sha256=BoReCpRO2p05gm7cOBla0DBqt48l-ZFqOm4WdWiEVF8,8973
464
+ khoj-2.0.0b9.dev7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
465
+ khoj-2.0.0b9.dev7.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
466
+ khoj-2.0.0b9.dev7.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
467
+ khoj-2.0.0b9.dev7.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"}}}]);