Skip to content

Commit

Permalink
Merge pull request #76 from justyns/ai-tester
Browse files Browse the repository at this point in the history
AI Connectivity Tester command and page
  • Loading branch information
justyns authored Jan 14, 2025
2 parents c392bd3 + 244778e commit 01e4781
Show file tree
Hide file tree
Showing 23 changed files with 7,522 additions and 295 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deno-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: ["main"]

permissions:
contents: write
contents: write

jobs:
test:
Expand All @@ -25,19 +25,19 @@ jobs:

- name: Verify formatting
run: deno fmt --check

- name: Run Deno test
run: deno task test

- name: Coverage
run: deno coverage --lcov cov_profile/ > cov.lcov

# - name: Run linter
# run: deno lint
# - name: Run linter
# run: deno lint

- name: Setup silverbullet
run: deno install -f --name silverbullet --unstable-kv --unstable-worker-options -A https://get.silverbullet.md

- name: Add Deno bin to PATH
run: echo "$HOME/.deno/bin" >> $GITHUB_PATH

Expand All @@ -57,4 +57,4 @@ jobs:
git config --global user.email '[email protected]'
git add silverbullet-ai.plug.js || true
git commit -m "Auto update silverbullet-ai.plug.js [skip ci]" || true
git push
git push
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ isn't too helpful for most cases.
- **AI: Search**: Ask the user for a search query, and then navigate to the search results page.
Search results are provided by calculating the cosine similarity between the
query embedding and each indexed embedding.
- **AI: Connectivity Test**: Command to navigate to the AI Connectivity Test page, which runs various tests against the currently selected models.

<!-- end-commands-and-functions -->

Expand Down
2 changes: 2 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This page is a brief overview of each version.

## Unreleased
- Better logging when SSE events have errors
- Add support for retrieving list of models from openai and ollama providers
- Add a Connectivity Test command and page to test whether an api is working

---
## 0.4.1 (2024-11-15)
Expand Down
8 changes: 8 additions & 0 deletions docs/Commands/AI: Connectivity Test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
tags: commands
commandName: "AI: Connectivity Test"
commandSummary: "Command to navigate to the AI Connectivity Test page, which runs various tests against the currently selected models."
---

This command redirects the client to a page which runs various tests against the current configuration. It's meant to
locate issues with the currently selected models.
278 changes: 138 additions & 140 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -1,185 +1,183 @@
/* Thanks chatgpt for helping me with the color scheme and styling */

:root {
--text-color-light: #4F4F4F;
--background-color-light: #fff;
--text-color-dark: #E6E6E6;
--background-color-dark: #282a36;
--accent-color-dark: #9AD1F5;
--accent-color-light: #62A8D1;
--font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
--sidebar-bg-dark: #44475a;
--sidebar-bg-light: #e2e2e2;
--border-color-light: #ccc;
--border-color-dark: #6272a4;
--sidebar-text-color-dark: #f8f8f2;
--sidebar-text-color-light: #333;
--sidebar-hover-color: #a0d9cc;
--sidebar-sublist-bg: #383a59;
--sidebar-hover-color-light: #034f3d;
--sidebar-sublist-bg-light: #D3D3D3;
--text-color-light: #4f4f4f;
--background-color-light: #fff;
--text-color-dark: #e6e6e6;
--background-color-dark: #282a36;
--accent-color-dark: #9ad1f5;
--accent-color-light: #62a8d1;
--font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
--sidebar-bg-dark: #44475a;
--sidebar-bg-light: #e2e2e2;
--border-color-light: #ccc;
--border-color-dark: #6272a4;
--sidebar-text-color-dark: #f8f8f2;
--sidebar-text-color-light: #333;
--sidebar-hover-color: #a0d9cc;
--sidebar-sublist-bg: #383a59;
--sidebar-hover-color-light: #034f3d;
--sidebar-sublist-bg-light: #d3d3d3;
}


@media (prefers-color-scheme: dark) {
body {
color: var(--text-color-dark);
background-color: var(--background-color-dark);
}

a[href],
thead tr,
.sidebar a {
color: var(--accent-color-dark);
}

tbody tr:nth-of-type(even),
.sidebar {
background-color: var(--sidebar-bg-dark);
}

.sidebar ul li a {
color: var(--sidebar-text-color-dark);
}

.sidebar ul li a:hover {
color: var(--sidebar-hover-color);
}

.sidebar ul ul {
background-color: var(--sidebar-sublist-bg);
padding: 10px;
border-radius: 5px;
}

.sidebar ul li {
list-style-type: circle;
margin-left: 20px;
}

blockquote,
pre {
border-left: 3px solid var(--accent-color-dark);
}
body {
color: var(--text-color-dark);
background-color: var(--background-color-dark);
}

a[href],
thead tr,
.sidebar a {
color: var(--accent-color-dark);
}

tbody tr:nth-of-type(even),
.sidebar {
background-color: var(--sidebar-bg-dark);
}

.sidebar ul li a {
color: var(--sidebar-text-color-dark);
}

.sidebar ul li a:hover {
color: var(--sidebar-hover-color);
}

.sidebar ul ul {
background-color: var(--sidebar-sublist-bg);
padding: 10px;
border-radius: 5px;
}

.sidebar ul li {
list-style-type: circle;
margin-left: 20px;
}

blockquote,
pre {
border-left: 3px solid var(--accent-color-dark);
}
}

@media (prefers-color-scheme: light) {
body {
color: var(--text-color-light);
background-color: var(--background-color-light);
}

a[href],
thead tr,
.sidebar a {
color: var(--accent-color-light);
}

tbody tr:nth-of-type(even),
.sidebar {
background-color: var(--sidebar-bg-light);
}

.sidebar ul li a {
color: var(--sidebar-text-color-light);
}

.sidebar ul li a:hover {
color: var(--sidebar-hover-color-light);
}

.sidebar ul ul {
background-color: var(--sidebar-sublist-bg-light);
padding: 10px;
border-radius: 5px;
}

.sidebar ul li {
list-style-type: square;
margin-left: 20px;
}

blockquote,
pre {
border-left: 3px solid var(--border-color-light);
}
body {
color: var(--text-color-light);
background-color: var(--background-color-light);
}

a[href],
thead tr,
.sidebar a {
color: var(--accent-color-light);
}

tbody tr:nth-of-type(even),
.sidebar {
background-color: var(--sidebar-bg-light);
}

.sidebar ul li a {
color: var(--sidebar-text-color-light);
}

.sidebar ul li a:hover {
color: var(--sidebar-hover-color-light);
}

.sidebar ul ul {
background-color: var(--sidebar-sublist-bg-light);
padding: 10px;
border-radius: 5px;
}

.sidebar ul li {
list-style-type: square;
margin-left: 20px;
}

blockquote,
pre {
border-left: 3px solid var(--border-color-light);
}
}

body {
display: flex;
flex-direction: column;
font-family: var(--font-family);
font-size: 16px;
max-width: 100%;
margin: 0;
padding: 0;
transition: color 0.3s ease, background-color 0.3s ease;
display: flex;
flex-direction: column;
font-family: var(--font-family);
font-size: 16px;
max-width: 100%;
margin: 0;
padding: 0;
transition: color 0.3s ease, background-color 0.3s ease;
}

@media (min-width: 768px) {
body {
flex-direction: row;
}
body {
flex-direction: row;
}
}

.content {
flex-grow: 1;
max-width: 800px;
width: 100%;
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
flex-grow: 1;
max-width: 800px;
width: 100%;
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
}

.sidebar {
width: 100%;
padding: 20px;
height: 100vh;
overflow-y: auto;
box-sizing: border-box;
width: 100%;
padding: 20px;
height: 100vh;
overflow-y: auto;
box-sizing: border-box;
}

@media (min-width: 768px) {
.sidebar {
width: 250px;
height: auto;
}
.sidebar {
width: 250px;
height: auto;
}
}

table {
width: 100%;
border-collapse: collapse;
width: 100%;
border-collapse: collapse;
}

th,
td {
padding: 8px;
border: 1px solid var(--border-color-light);
padding: 8px;
border: 1px solid var(--border-color-light);
}

@media (prefers-color-scheme: dark) {

th,
td {
border: 1px solid var(--border-color-dark);
}
th,
td {
border: 1px solid var(--border-color-dark);
}
}

ul li p,
blockquote,
pre {
margin: 0;
padding-left: 20px;
margin: 0;
padding-left: 20px;
}

a[href] {
text-decoration: underline;
transition: color 0.3s ease;
text-decoration: underline;
transition: color 0.3s ease;
}

img {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
Loading

0 comments on commit 01e4781

Please sign in to comment.