diff --git a/src/khoj/interface/web/assets/icons/automation.svg b/src/khoj/interface/web/assets/icons/automation.svg new file mode 100644 index 00000000..162dd9ba --- /dev/null +++ b/src/khoj/interface/web/assets/icons/automation.svg @@ -0,0 +1,37 @@ + + + + + + + diff --git a/src/khoj/interface/web/assets/icons/copy-solid.svg b/src/khoj/interface/web/assets/icons/copy-solid.svg deleted file mode 100644 index da7020be..00000000 --- a/src/khoj/interface/web/assets/icons/copy-solid.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/khoj/interface/web/assets/icons/delete.svg b/src/khoj/interface/web/assets/icons/delete.svg new file mode 100644 index 00000000..8e078275 --- /dev/null +++ b/src/khoj/interface/web/assets/icons/delete.svg @@ -0,0 +1,26 @@ + + + + + diff --git a/src/khoj/interface/web/assets/icons/microphone-solid.svg b/src/khoj/interface/web/assets/icons/microphone-solid.svg deleted file mode 100644 index 3fc4b91d..00000000 --- a/src/khoj/interface/web/assets/icons/microphone-solid.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/khoj/interface/web/assets/icons/new.svg b/src/khoj/interface/web/assets/icons/new.svg new file mode 100644 index 00000000..f27d95f6 --- /dev/null +++ b/src/khoj/interface/web/assets/icons/new.svg @@ -0,0 +1,23 @@ + + + + + diff --git a/src/khoj/interface/web/assets/icons/trash-solid.svg b/src/khoj/interface/web/assets/icons/trash-solid.svg deleted file mode 100644 index 768d80f8..00000000 --- a/src/khoj/interface/web/assets/icons/trash-solid.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/khoj/interface/web/base_config.html b/src/khoj/interface/web/base_config.html index 31020c05..ccd301c7 100644 --- a/src/khoj/interface/web/base_config.html +++ b/src/khoj/interface/web/base_config.html @@ -257,6 +257,14 @@ color: var(--leaf); } + img.automation-action-icon { + width: 16px; + padding-bottom: 2px; + } + img.automation-row-icon { + max-width: 24px; + } + img.configured-icon { max-width: 16px; } diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index 5302f311..cb18ba0a 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -2137,6 +2137,10 @@ To get started, just start typing below. You can also type / to see a list of co img.text-to-image { max-width: 60%; } + h3 > img.text-to-image { + height: 24px; + vertical-align: sub; + } #chat-footer { padding: 0; diff --git a/src/khoj/interface/web/config.html b/src/khoj/interface/web/config.html index ceb09ff1..50858f26 100644 --- a/src/khoj/interface/web/config.html +++ b/src/khoj/interface/web/config.html @@ -276,8 +276,10 @@

Automations

- Automations -

Automations

+ Automations +

+ Automations +

Manage your automations

@@ -296,6 +298,7 @@
@@ -607,13 +610,18 @@ function copyAPIKey(token) { // Copy API key to clipboard navigator.clipboard.writeText(token); - // Flash the API key copied message - const copyApiKeyButton = document.getElementById(`api-key-${token}`); - original_html = copyApiKeyButton.innerHTML + // Flash the API key copied icon + const apiKeyColumn = document.getElementById(`api-key-${token}`); + const original_html = apiKeyColumn.innerHTML; + const copyApiKeyButton = document.getElementById(`api-key-copy-${token}`); setTimeout(function() { - copyApiKeyButton.innerHTML = "✅ Copied!"; + copyApiKeyButton.src = "/static/assets/icons/copy-button-success.svg"; + setTimeout(() => { + copyApiKeyButton.src = "/static/assets/icons/copy-button.svg"; + }, 1000); + apiKeyColumn.innerHTML = "✅ Copied!"; setTimeout(function() { - copyApiKeyButton.innerHTML = original_html; + apiKeyColumn.innerHTML = original_html; }, 1000); }, 100); } @@ -641,8 +649,8 @@ ${tokenName} ${truncatedToken} - Copy API Key - Delete API Key + Copy API Key + Delete API Key `; @@ -684,7 +692,7 @@ ${automationObj.query_to_run} ${automationObj.schedule} - Delete Automation + Delete Automation `; diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index e4b1ad2c..882937b9 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -407,8 +407,10 @@ async def websocket_endpoint( # Remove /automated_task prefix from inferred_query unprefixed_query_to_run = re.sub(r"^\/automated_task\s*", "", query_to_run) # Create the automation response + scheme = "http" if not websocket.url.is_secure else "https" + automation_icon_url = f"{scheme}://{websocket.url.netloc}/static/assets/icons/automation.svg" llm_response = f""" - ### 🕒 Automation + ### ![]({automation_icon_url}) Created Automation - Subject: **{subject}** - Query to Run: "{unprefixed_query_to_run}" - Schedule: `{schedule}` @@ -661,8 +663,10 @@ async def chat( # Remove /automated_task prefix from inferred_query unprefixed_query_to_run = re.sub(r"^\/automated_task\s*", "", query_to_run) # Create the Automation response + scheme = "http" if not request.url.is_secure else "https" + automation_icon_url = f"{scheme}://{request.url.netloc}/static/assets/icons/automation.svg" llm_response = f""" - ### 🕒 Automation + ### ![]({automation_icon_url}) Created Automation - Subject: **{subject}** - Query to Run: "{unprefixed_query_to_run}" - Schedule: `{schedule}`