Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Kynlos authored Mar 22, 2024
1 parent cb1d21d commit 8b68433
Showing 1 changed file with 1 addition and 255 deletions.
256 changes: 1 addition & 255 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,255 +1 @@
<!--
This is the HTML code for the Codyception - Cody Command Creator by Kynlo.
It contains a form for creating custom commands and saving them as JSON files.
The form includes input fields for command name, command prompt, slash command, and command note.
It also includes a dropdown menu for selecting pre-made commands.
The code includes various icons and buttons for interacting with the form.
The JavaScript file "scripts.js" is linked at the end of the HTML code.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>
Codyception - Cody Command Creator by Kynlo
</title>
</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&amp;display=swap" rel="stylesheet"/>
<link href="styles.css" rel="stylesheet"/>

</head>

<body>
<div id="customCommandViewerModal" class="modal">
<div class="modal-content">
<!-- Removed inline onclick handler and ensured class="close" is present -->
<span class="close">&times;</span>
<iframe id="customCommandViewerFrame" src="commands.html" style="width:100%; height:80vh;" frameborder="0"></iframe>
</div>
</div>
<!-- Sidebar -->
<div class="sidebar" id="sidebar">
<nav class="sidebar-nav">
<a class="sidebar-link" href="https://discord.com/servers/sourcegraph-969688426372825169" target="_blank">
<i class="fab fa-discord">
</i>
Discord
</a>
<a class="sidebar-link" href="https://github.com/sourcegraph/cody/" target="_blank">
<i class="fab fa-github">
</i>
GitHub (Cody)
</a>
<a class="sidebar-link" href="https://github.com/Kynlos/Codyception/" target="_blank">
<i class="fab fa-github">
</i>
GitHub (Codyception)
</a>
<a class="sidebar-link" href="https://www.sourcegraph.com/" target="_blank">
<i class="fas fa-globe">
</i>
Sourcegraph
</a>
<a class="sidebar-link" href="https://docs.sourcegraph.com/" target="_blank">
<i class="fas fa-book">
</i>
Docs
</a>
<a class="sidebar-link" href="https://sourcegraph.com/blog" target="_blank">
<i class="fas fa-blog">
</i>
Blog
</a>
<a class="sidebar-link" href="#" onclick="openCustomCommandViewerModal()">
<i class="fa-solid fa-eye"></i>
Custom Command Viewer
</a>
<!--<a class="sidebar-link" href="#" id="openFolderButton">
<i class="fas fa-folder-open"></i>
Open Folder
</a>-->
</nav>
</div>

<!-- Main Container -->
<div class="container">
<!-- Hamburger Menu -->
<div class="hamburger-menu" onclick="toggleSidebar()">
<i class="fas fa-bars">
</i>
</div>

<!-- Title -->
<h1>
<i class="fa fa-code">
</i>
Codyception by Kynlo
</h1>

<!-- Dark Mode Toggle -->
<div id="darkModeToggle" onclick="toggleDarkMode()">
<i class="fas fa-lightbulb">
</i>
</div>

<!-- Pre-made Command Dropdown -->
<div>
<label for="premadeCommands">Select Pre-made Command (Optional):</label>
<select id="premadeCommands" class="select2-searchable">
<!-- Options will be dynamically populated here -->
</select>
</div>


<!-- Command Name Input -->
<div>
<label for="commandName">
Command Name:
</label>
<input id="commandName" placeholder="Enter command name (no spaces)" required="" title="Enter a unique name for the command without spaces. Use hyphens if needed." type="text"/>
</div>

<!-- Command Prompt Input -->
<div>
<label for="commandPrompt">
Command Prompt (Prompt to send to Cody.):
</label>
<small style="display: block; margin-bottom: 10px;">
Include as much detail as you can for the task you want to complete
</small>
<textarea id="commandPrompt" placeholder="Enter command prompt" required="" title="A set of questions with instructions for Cody to follow when answering questions."></textarea>
</div>

<!-- Command Context Dropdown -->
<div class="checkbox-group">
<label style="display: block; margin-bottom: 10px;">
Command Context (Click an item to select):
</label>
<div class="context-options" id="contextOptions">

<div class="context-option" data-value="selection" title="Include currently selected code from editor.">
<i class="fa fa-i-cursor">
</i>
selection
</div>
<div class="context-option" data-value="openTabs" title="Include code snippets from a list of open files in your current editor.">
<i class="fa fa-folder-open">
</i>
openTabs
</div>
<div class="context-option" data-value="currentDir" title="Include code snippets from first n files in current directory.">
<i class="fa fa-folder">
</i>
currentDir
</div>
<div class="context-option" data-value="currentFile" title="Include code snippets from current file.">
<i class="fa fa-file-code">
</i>
currentFile
</div>
<div class="context-option" data-value="command" title="Run terminal command locally and include output as context.">
<i class="fa fa-terminal">
</i>
command
</div>
<div class="context-option" data-value="none" title="If true, overrides all other context settings.">
<i class="fa fa-ban">
</i>
none
</div>
</div>
</div>

<!-- Slash Command Input -->
<div>
<label for="slashCommand">
Slash Command:
</label>
<input id="slashCommand" placeholder="Enter slash command (optional)" title="A single keyword for Cody to associate the command with during chat sessions, e.g. /reset" type="text"/>
</div>

<!-- Command Note Input -->
<div>
<label for="commandNote">
Command Note:
</label>
<input id="commandNote" placeholder="Enter command note (optional)" title="Optional additional note." type="text"/>
</div>

<!-- Show JSON Data Button -->
<button id="showJsonButton" title="Show JSON Data">
<i class="fa fa-code">
</i>
Show JSON Data
</button>

<!-- JSON Modal -->
<div class="modal" id="jsonModal">
<div class="modal-content">
<!-- Ensure class="close" is present -->
<span class="close" onclick="document.getElementById('jsonModal').style.display='none'">
×
</span>
<pre id="jsonDisplay"></pre>
<button id="copyJsonButton">
Copy JSON
</button>
</div>
</div>

<script>
document.addEventListener('keydown', function(event) {
if (event.key === 'Escape') {
document.getElementById('jsonModal').style.display = 'none';
}
});
</script>

<!-- Create Command Button -->
<button id="createCommand" title="Click to create the command and prompt to save as a JSON file.">
<i class="fa fa-plus-circle">
</i>
Create Command and Save
</button>

<!-- Open Cody AI Extension in VSCode Button -->
<button onclick="openVSCodeToExtension('sourcegraph.cody-ai')" style="display: flex; align-items: center; justify-content: center;" title="Open Cody AI in VSCode">
<svg aria-hidden="true" class="mdi-icon Icon-module__icon-inline NavItem-module__icon" height="20" role="img" viewbox="0 0 20 20" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M13.9088 4C14.756 4 15.4429 4.69836 15.4429 5.55983V8.33286C15.4429 9.19433 14.756 9.89269 13.9088 9.89269C13.0615 9.89269 12.3747 9.19433 12.3747 8.33286V5.55983C12.3747 4.69836 13.0615 4 13.9088 4Z" fill="#ffffff">
</path>
<path d="M4.19287 7.63942C4.19287 6.77795 4.87971 6.07959 5.72696 6.07959H8.45423C9.30148 6.07959 9.98832 6.77795 9.98832 7.63942C9.98832 8.50089 9.30148 9.19925 8.45423 9.19925H5.72696C4.87971 9.19925 4.19287 8.50089 4.19287 7.63942Z" fill="#ffffff">
</path>
<path d="M17.5756 12.1801C18.1216 12.7075 18.1437 13.5851 17.625 14.1403L17.1423 14.6569C13.3654 18.6994 6.99777 18.5987 3.34628 14.4387C2.84481 13.8674 2.89377 12.9909 3.45565 12.481C4.01752 11.9711 4.87954 12.0209 5.38102 12.5922C7.97062 15.5424 12.4865 15.6139 15.1651 12.747L15.6477 12.2304C16.1664 11.6752 17.0296 11.6527 17.5756 12.1801Z" fill="#ffffff">
</path>
</svg>
<span style="margin-left: 8px;">
Open Cody AI Extension in VSCode
</span>
</button>

<!-- Instructions Button -->
<div>
<button id="instructionsButton" title="Click to view the instructions for adding custom commands.">
<i class="fa fa-question-circle">
</i>
Instructions For Adding Custom Commands
</button>
</div>
</div>

<!-- GitHub Updates Banner -->
<div id="githubUpdatesBanner" class="github-updates-banner">
<div id="githubUpdatesContent" class="github-updates-content">
</div>
</div>

<!-- JavaScript File -->
<script src="scripts.js"></script>
</body>
</html>
<!--Removed - see /src-->

0 comments on commit 8b68433

Please sign in to comment.