Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bundlewatch.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
},
{
path: './build/livecodes/lang-*.js',
maxSize: '20kB',
maxSize: '10kB',
},
{
path: './build/livecodes/*.css',
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A [feature-rich](https://livecodes.io/docs/features/), open-source, **client-sid
[![LiveCodes: docs](https://img.shields.io/badge/Documentation-575757?logo=gitbook&logoColor=white)](https://livecodes.io/docs/)
[![LiveCodes: llms.txt](https://img.shields.io/badge/llms.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms.txt)
[![LiveCodes: llms-full.txt](https://img.shields.io/badge/llms--full.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms-full.txt)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3d39f15618e048db9d13c2a0e8002b33)](https://www.codacy.com/gh/live-codes/livecodes/dashboard?utm_source=github.com&utm_medium=referral&utm_content=live-codes/livecodes&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3d39f15618e048db9d13c2a0e8002b33)](https://app.codacy.com/gh/live-codes/livecodes/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Lokalise: translated](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/live-codes/lokalise-badge/main/badges/translated.json)](https://app.lokalise.com/public/34958094667a72e9454592.95108106/)
[![Lokalise: UI languages](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/live-codes/lokalise-badge/main/badges/languages.json)](https://app.lokalise.com/public/34958094667a72e9454592.95108106/)
[![license - MIT](https://img.shields.io/github/license/live-codes/livecodes)](https://github.com/live-codes/livecodes/blob/develop/LICENSE)
Expand Down Expand Up @@ -270,8 +270,8 @@ LiveCodes uses services that are generously provided by:
</img></a><br /><br />
</p>
<p>
<a href="https://codeium.com/" target="_blank" title="Codeium">
<img alt="Codeium" width="200" src="https://dev.livecodes.io/docs/img/credits/codeium.svg">
<a href="https://windsurf.com/" target="_blank" title="Windsurf">
<img alt="Windsurf" width="200" src="https://dev.livecodes.io/docs/img/credits/windsurf.svg">
</img></a><br /><br />
</p>
<p>
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/credits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ LiveCodes uses services that are generously provided by:
</a>
</p>
<p>
<a href="https://codeium.com/" target="_blank" title="Codeium">
<a href="https://windsurf.com/" target="_blank" title="Windsurf">
<img
alt="Codeium"
alt="Windsurf"
width="200"
style={{ margin: '0.5em' }}
src="/docs/img/credits/codeium.svg"
src="/docs/img/credits/windsurf.svg"
></img>
</a>
</p>
Expand Down
11 changes: 3 additions & 8 deletions docs/docs/features/ai.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# AI Code Assistant 🪄

LiveCodes supports AI-powered code completion, totally for **free** with **no account or API token required**, using [Codeium](https://codeium.com/), the ultrafast Copilot alternative. This can be easily enabled from the UI (as easy as [flipping a switch](#ui)!)
LiveCodes supports AI-powered code completion, totally for **free** with **no account or API token required**, using [Windsurf](https://windsurf.com/). This can be easily enabled from the UI (as easy as [flipping a switch](#ui)!)

The large generative machine learning model is capable of understanding the context of your code and comments (across the [3 code editors](./projects#markup-editor)) in order to generate suggestions on what you might want to type next.

It has a wide range of language support, and it works everywhere (in the [standalone app](../getting-started.mdx#standalone-app), [embedded playgrounds](./embeds.mdx) and [self-hosted](./self-hosting.mdx) apps).

Powered by:

<a href="https://codeium.com/">
<img width="300px" src="/docs/img/credits/codeium.svg" alt="Codeium logo" />
</a>
.
Powered by: <a href="https://windsurf.com/" target="_blank" title="Windsurf" rel='noopener noreferrer'><img style={{height: "3em", translate: "0 40%", marginTop: "-2em"}} src="/docs/img/credits/windsurf.svg" alt="Windsurf logo" /></a>

## Examples:

Expand Down Expand Up @@ -74,6 +69,6 @@ On mobile, tap on the suggestion to accept it, or continue typing to reject.

:::caution Note

Please note that when using Codeium AI assistant, your code is sent to Codeium servers for code completion. However, your code is not used for training their model. Check Codeium [FAQ](https://codeium.com/faq#Will-Codeium-regurgitate-private-code%3F) and [privacy policy](https://codeium.com/privacy-policy) for more details.
Please note that when using Windsurf AI assistant, your code is sent to Windsurf servers for code completion. However, your code is not used for training their model. Check Windsurf [FAQ](https://windsurf.com/faq#will-windsurf-regurgitate-private-code) and [privacy policy](https://windsurf.com/privacy-policy) for more details.

:::
2 changes: 1 addition & 1 deletion docs/docs/features/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The default code editor is the powerful editor that powers [VS Code](https://cod

## AI Code Assistant

LiveCodes supports AI-powered code completion, totally for **free**, using [Codeium](https://codeium.com/), the ultrafast Copilot alternative. Install the [Codeium chrome extension](https://codeium.com/chrome_tutorial) and enjoy the magic!
LiveCodes supports AI-powered code completion, totally for **free**, using [Windsurf](https://windsurf.com/). No account or tokens required. Enable from [editor settings](./ai.mdx#ui) and enjoy the magic!

## Mobile-friendly

Expand Down
3 changes: 3 additions & 0 deletions docs/static/img/credits/windsurf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/livecodes/UI/editor-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const createEditorSettingsUI = async ({
help: `${process.env.DOCS_BASE_URL}features/ai`,
note: window.deps.translateString(
'editorSettings.enableAI.note',
'Powered by <a href="https://codeium.com" rel="noopener noreferrer" target="_blank"><img src="{{baseUrl}}assets/images/codeium.svg" style="height: 1.2em; vertical-align: bottom;" alt="Codeium" /></a>',
'Powered by <a href="https://windsurf.com/" rel="noopener noreferrer" target="_blank"><img id="windsurf-logo" src="{{baseUrl}}assets/images/windsurf.svg" style="height: 3em; translate: 0 40%; margin-top: -2em;" alt="Windsurf" /></a>',
{
isHTML: true,
baseUrl,
Expand Down Expand Up @@ -532,6 +532,13 @@ export const createEditorSettingsUI = async ({
});
}

const windsurfLogo = document.getElementById('windsurf-logo')!;
if (formData.theme === 'light') {
windsurfLogo.style.filter = 'invert(1)';
} else {
windsurfLogo.style.filter = 'unset';
}

if (!init) {
deps.changeSettings(formData);
codeEditor = formData.editor;
Expand Down
3 changes: 3 additions & 0 deletions src/livecodes/assets/images/windsurf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/livecodes/i18n/locales/en/translation.lokalise.json
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@
"translation": "Enable AI Code Assistant"
},
"editorSettings.enableAI.note": {
"notes": "### <tag-1> ###\n<a href=\"https://codeium.com\" rel=\"noopener noreferrer\" target=\"_blank\" />\n\n### <tag-2> ###\n<img src=\"{{baseUrl}}assets/images/codeium.svg\" style=\"height: 1.2em; vertical-align: bottom;\" alt=\"Codeium\" />\n\n",
"notes": "### <tag-1> ###\n<a href=\"https://windsurf.com/\" rel=\"noopener noreferrer\" target=\"_blank\" />\n\n### <tag-2> ###\n<img id=\"windsurf-logo\" src=\"{{baseUrl}}assets/images/windsurf.svg\" style=\"height: 3em; translate: 0 40%; margin-top: -2em;\" alt=\"Windsurf\" />\n\n",
"translation": "Powered by <tag-1><tag-2></tag-2></tag-1>"
},
"editorSettings.foldRegions": {
Expand Down
1 change: 1 addition & 0 deletions src/livecodes/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,7 @@ pre[class*='language-'].line-numbers > code {

input[type='radio'] {
border-radius: 50%;
margin-bottom: var(--s8);

&::after {
background: var(--inner-active);
Expand Down
2 changes: 1 addition & 1 deletion src/livecodes/styles/inc-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@
}

.panel {
input {
input:not([type='radio']) {
margin-bottom: 0;
}

Expand Down