Skip to content

Commit

Permalink
Clean up new prompt feature
Browse files Browse the repository at this point in the history
  • Loading branch information
marshyski committed Aug 5, 2024
1 parent cc9ee36 commit ea80e06
Show file tree
Hide file tree
Showing 13 changed files with 643 additions and 51 deletions.
31 changes: 18 additions & 13 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,12 @@ ajv-formats@^2.1.1:
dependencies:
ajv "^8.0.0"

ajv-keywords@^3.4.1, ajv-keywords@^3.5.2:
ajv-keywords@^3.4.1:
version "3.5.2"
resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz"
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==

ajv-keywords@^3.5.2:
version "3.5.2"
resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz"
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
Expand All @@ -2535,17 +2540,7 @@ ajv@^6.12.2, ajv@^6.12.5, ajv@^6.9.1:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"

ajv@^8.0.0:
version "8.11.0"
resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz"
integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==
dependencies:
fast-deep-equal "^3.1.1"
json-schema-traverse "^1.0.0"
require-from-string "^2.0.2"
uri-js "^4.2.2"

ajv@^8.8.2, ajv@^8.9.0:
ajv@^8.0.0, ajv@^8.8.2, ajv@^8.9.0:
version "8.13.0"
resolved "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz"
integrity sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==
Expand Down Expand Up @@ -7673,7 +7668,12 @@ source-map-support@~0.5.20:
buffer-from "^1.0.0"
source-map "^0.6.0"

source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0:
source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==

source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
Expand All @@ -7683,6 +7683,11 @@ source-map@^0.7.0:
resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz"
integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==

source-map@~0.6.0:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==

space-separated-tokens@^2.0.0:
version "2.0.2"
resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz"
Expand Down
4 changes: 4 additions & 0 deletions ui/agent-auth-token/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
4 changes: 4 additions & 0 deletions ui/alert-settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
4 changes: 4 additions & 0 deletions ui/configuration-settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
4 changes: 4 additions & 0 deletions ui/event-triggers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
4 changes: 4 additions & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
4 changes: 4 additions & 0 deletions ui/profile-settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
230 changes: 230 additions & 0 deletions ui/prompt/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
<!DOCTYPE html>
<!--
* CoreUI - Free Bootstrap Admin Template
* @version v4.1.0
* @link https://coreui.io
* Copyright (c) 2021 creativeLabs Łukasz Holeczek
* Licensed under MIT (https://coreui.io/license)
-->

<html lang="en">
<!-- HEAD START -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>paradrop - Prompt</title>
<link rel="icon" type="image/x-icon" href="../static/assets/favicon.png">

<!-- CSS FILES STARTS -->
<link href="../static/css/coreui/style.min.css" rel="stylesheet">
<link href="../static/css_min/custom_style.min.css" rel="stylesheet">
<!-- CSS FILES ENDS -->

<!-- SLIM SELECT CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/slim-select/1.27.1/slimselect.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/slim-select/1.27.1/slimselect.min.css" rel="stylesheet"></link>

<!-- FONT AWESOME CDN -->
<script src="https://kit.fontawesome.com/d8fe3770e3.js" crossorigin="anonymous"></script>

</head>
<!-- HEAD END -->

<!-- BODY START -->
<body>

<!-- SIDEBAR START -->
<div class="sidebar sidebar-dark sidebar-fixed bg-danger" id="sidebar">

<!-- SIDEBAR LOGO START -->
<div class="sidebar-brand d-none d-md-flex">
<a class="me-2 mt-1" href="/ui/"><img src="../static/assets/logo.png" alt="paradrop logo"></a>
</div>
<!-- SIDEBAR LOGO END -->

<!-- SIDEBAR OPTIONS START -->
<ul class="sidebar-nav overflow-hidden" data-coreui="navigation" data-simplebar>
<li class="nav-item d-xl-none">
<span class="fa-solid fa-xmark fa-xl me-3 my-4 d-flex justify-content-end" onclick="coreui.Sidebar.getInstance(document.querySelector('#sidebar')).toggle()"></span>
</li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/">
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/event-triggers/">
<span class="fa-solid fa-land-mine-on fa-lg ms-1 me-3"></span>
Event Triggers</a></li>

<li class="nav-group"><a class="nav-link text-light nav-group-toggle" href="#">
<span class="fa-solid fa-tools fa-lg ms-1 me-3"></span>
Settings</a>

<ul class="nav-group-items">
<li class="nav-item"><a class="nav-link" href="/ui/alert-settings/#"><span class="fa-solid fa-bell fa-lg ms-1 me-3"></span>Alert Settings</a></li>
<li class="admin nav-item"><a class="nav-link" href="/ui/agent-auth-token/"><span class="fa-solid fa-key fa-lg ms-1 me-3"></span>Agent Auth Token</a></li>
<li class="nav-item"><a class="nav-link" href="/ui/configuration-settings/"><span class="fa-solid fa-sliders fa-lg ms-1 me-3"></span>Config Settings</a></li>
<li class="nav-item"><a class="nav-link" href="/ui/profile-settings/"><span class="fa-solid fa-address-card fa-lg ms-1 me-3"></span>Profile Settings</a></li>
<li class="nav-item"><a class="nav-link" href="/ui/users-settings/"><span class="fa-solid fa-users fa-lg ms-1 me-3"></span>Users Settings</a></li>
</ul>
</li>
</ul>
<!-- SIDEBARD OPTIONS END -->
</div>
<!-- SIDEBAR END -->

<!-- WRAPPER START -->
<div class="wrapper d-flex flex-column min-vh-100 bg-light">

<!-- HEADER START -->
<header>

<!-- HEADER CONTAINER START -->
<div class="container-fluid">
<div class="row border rounded m-2 p-2 bg-danger">

<!-- LEFT SIDE BREADCRUMBS START-->
<div class="col-10">
<ul class="header-nav">

<!-- SIDEBAR TOGGLE BUTTON START -->
<li class="nav-item">
<button class="header-toggler ps-0 d-lg-none" type="button" onclick="coreui.Sidebar.getInstance(document.querySelector('#sidebar')).toggle()">
<span class="fas fa-bars border rounded p-1 text-light"></span>
</button>
</li>
<!-- SIDEBAR TOGGLE BUTTON END -->
<h6 class="text-light d-none d-lg-block" style="margin-top: 0.95rem;">
<a class="text-decoration-none" href="/ui/">
<span class="fas fa-home text-light"></span>
</a>
<span class="fas fa-solid fa-chevron-right mx-2"></span>
Prompt
</h6>
</ul>
</div>
<!-- LEFT SIDE BREADCRUMBS END-->

<!-- RIGHT-SIDE DROPDOWN MENU START-->
<div class="col-2 d-flex justify-content-end">
<ul class="header-nav ms-3">
<li class="nav-item dropdown">
<a class="nav-link py-0" data-coreui-toggle="dropdown" href="#" role="button">
<div class="avatar avatar-md">
<span class="fas fa-user-astronaut fa-2x text-light"></span>
</div>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" id="logout">
<span class="fas fa-sign-out-alt"></span> Logout
</a>
</div>
</li>
</ul>
</div>
<!-- RIGHT-SIDE DROPDOWN MENU END-->
</div>
</div>
<!-- HEADER CONTAINER END -->
</header>
<!-- HEADER END -->

<!-- BODY CONTENT START-->
<!-- PROMPT CONTAINER START -->
<div class="container-fluid">

<!-- PROMPT ROW START -->
<div class="row rounded bg-white mx-2 mt-2 p-4 pe-0 shadow">

<!-- PROMPT TITLE START -->
<div class="col mb-1 mt-1 me-2 d-flex justify-content-start">
<h2>Prompt</h2>
</div>
<!-- PROMPT TITLE END -->

<div class="col mb-2 mt-1 me-4 pe-0 d-flex justify-content-end">
<button class="btn btn-white text-dark border me-4" type="button"
data-coreui-toggle="modal" data-coreui-target="#addReportModal"
id="copyChat" aria-label="Copy entire chat">
Copy Chat
</button>
<button class="btn btn-white text-dark border" type="button"
data-coreui-toggle="modal" data-coreui-target="#addReportModal"
id="clearChat" aria-label="Clear chat history">
Clear Chat
</button>
</div>

<div class="container d-flex flex-column flex-grow-1">
<div class="chat-container" id="chatContainer">
<div class="message-group system-group">
<div class="message-label">Paradrop-AI</div>
<div class="chat-message system-message">
<button class="copy-button" aria-label="Copy message">📋</button>
Hello! What are you searching for?
</div>
</div>
</div>
</div>

<div class="input-container">
<div class="container">
<div class="input-group">
<textarea
class="form-control chat-input"
id="chatInput"
placeholder="Type your message here..."
aria-label="Chat input"
></textarea>
<button
class="btn btn-danger text-light"
type="button"
id="sendMessage"
aria-label="Send message"
>
Send
</button>
<button
class="btn btn-secondary text-light"
type="button"
id="clearInput"
aria-label="Clear input"
>
Clear
</button>
</div>
</div>
</div>

<div id="notificationBar" class="notification-bar">
Message copied to clipboard!
</div>

</div>
<!-- PROMPT ROW END -->
</div>
<!-- PROMPT CONTAINER END -->
<!-- BODY CONTENT END-->
</div>
<!-- WRAPPER END -->

<!-- SCRIPTS START -->
<!-- CoreUI and necessary plugins-->
<script src="../static/js/coreui/coreui.bundle.min.js"></script>
<script src="../static/js/simplebar/dist/simplebar.min.js"></script>
<!-- Script that handles functionality for this HTML page -->
<script type="module" src="../static/js_min/authorization_check.min.js" crossorigin="anonymous"></script>
<script type="module" src="../static/js_min/prompt.min.js" crossorigin="anonymous"></script>
<script type="module" src="../static/js_min/logout.min.js" crossorigin="anonymous"></script>
<!-- SCRIPTS END -->
</body>
<!-- BODY END -->
</html>
4 changes: 4 additions & 0 deletions ui/reports/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<span class="fa-solid fa-search fa-lg ms-1 me-3"></span>
Search</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/prompt/">
<span class="fa-solid fa-wand-magic-sparkles fa-lg ms-1 me-3"></span>
Prompt</a></li>

<li class="nav-item"><a class="nav-link text-light" href="/ui/reports/">
<span class="fa-solid fa-heartbeat fa-lg ms-1 me-3"></span>
Reports</a></li>
Expand Down
Loading

0 comments on commit ea80e06

Please sign in to comment.