Skip to content

Commit

Permalink
docs: add videos to doc
Browse files Browse the repository at this point in the history
  • Loading branch information
2214962083 committed Jul 19, 2024
1 parent 9e4f0d6 commit b2dc719
Show file tree
Hide file tree
Showing 44 changed files with 159 additions and 153 deletions.
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"titleBar.activeForeground": "#F8FCFD"
},
"cSpell.words": [
"autoplay",
"Codegee",
"Codeium",
"commitlint",
Expand All @@ -72,8 +73,5 @@
"vitepress",
"vsix",
"Zhipu"
],
"aide.convertLanguagePairs": {
"typescript": "python"
}
]
}
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ scripts
.vscode-test/**
.vscode-test-web/**
out/**
website/**
73 changes: 8 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ Mastering Any Code In VSCode: One-click commenting and language conversion. 💪

</div>

## Document 📚

- See: [https://aide.nicepkg.cn](https://aide.nicepkg.cn)

<img src="https://github.com/user-attachments/assets/9eafa68b-30ec-4ad6-96de-317231e604b1" alt="Aide Intro" width="100%" />

## Features ✨

- 🔄 **Code Conversion**: One-click code transformation between languages.
- 📖 **Code Annotation**: One-click detailed comments for better readability.
- 📋 **Quick Copy**: Copy files/folders as AI prompts instantly.
- 📋 **Quick Copy**: Batch copy files/folders as AI prompts.
- 💬 **Custom Commands**: Execute custom AI commands on selected files.
- 🔀 **Variable Rename**: Rename variables using AI-suggested variable names.
- 🎛 **Prompt Templates**: Define flexible AI prompt templates.
Expand All @@ -35,76 +41,13 @@ Mastering Any Code In VSCode: One-click commenting and language conversion. 💪
3. Search for "[Aide](https://marketplace.visualstudio.com/items?itemName=nicepkg.aide-pro)"
4. Click Install

## Configuration 🛠

See: [Document](https://github.com/nicepkg/aide/tree/master/docs/configuration/README.md)

## Usage 🚀

### 1. Aide: Code Convert

Convert selected code from one programming language to another using AI.

**How to Use:**

- Select code in the editor.
- Click the paper-like icon in the top right corner or right-click and choose `✨ Aide: Code Convert`.

### 2. Aide: Code Viewer Helper

Add comments to the selected code to make it readable for beginners, using AI.

**How to Use:**

- Select code in the editor.
- Click the book-like icon in the top right corner or right-click and choose `✨ Aide: Code Viewer Helper`.

### 3. Aide: Copy As AI Prompt

Copy selected files' contents into the clipboard, formatted as a prompt for AI interaction.

**How to Use:**

- Select files or folders in the Explorer.
- Right-click and choose `✨ Aide: Copy As AI Prompt`.

### 4. Aide: Ask AI

Prepare and execute custom AI commands based on selected files and user input.

**How to Use:**

- Select files or folders in the Explorer.
- Right-click and choose `✨ Aide: Ask AI`.
- Enter your question when prompted.

### 5. Aide: Rename Variable

Rename variables using AI-suggested variable names.

**How to Use:**

- Select a variable in the editor.
- Right-click and choose `✨ Aide: Rename Variable`.
- Select a suggested variable name.

### 6. Customizing Keyboard Shortcuts

Assign custom keyboard shortcuts to these commands for faster access:

1. Open the Keyboard Shortcuts editor (`Ctrl+K Ctrl+S` or `Cmd+K Cmd+S`).
2. Search for the desired Aide command.
3. Click the plus icon next to the command and press your desired key combination.

Enhance your productivity with Aide's AI-powered features. Install now and experience a smarter way to code!

## ChangeLog 📅

See the [CHANGELOG](https://github.com/nicepkg/aide/blob/master/CHANGELOG.md) for the latest updates.

## Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request. See the [contributing guide](https://github.com/nicepkg/aide/blob/master/CONTRIBUTING.md) for more details.
Contributions are welcome! Please feel free to submit a Pull Request. See the [Contributing Guide](https://github.com/nicepkg/aide/blob/master/CONTRIBUTING.md) for more details.

This project exists thanks to all the people who contribute:

Expand Down
79 changes: 11 additions & 68 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@

</div>

## 文档 📚

- 查看:[https://aide.nicepkg.cn](https://aide.nicepkg.cn)

<img src="https://github.com/user-attachments/assets/9eafa68b-30ec-4ad6-96de-317231e604b1" alt="Aide Intro" width="100%" />

## 功能 ✨

- 🔄 **代码转换**:一键代码语言转换。
- 📖 **代码注释**:一键添加详细注释,提升可读性。
- 📋 **快速复制**即时复制文件/文件夹为AI提示
- 💬 **自定义命令**对选定文件执行自定义AI命令
- 🔀 **变量重命名**使用AI给出的变量名建议重命名变量
- 🎛 **提示模板**定义灵活的AI提示模板
- 📁 **多文件支持**:选择多个文件/文件夹进行AI提示或命令
- 📋 **快速复制**批量复制文件/文件夹为 AI 提示
- 💬 **自定义命令**对选定文件执行自定义 AI 命令
- 🔀 **变量重命名**使用 AI 给出的变量名建议重命名变量
- 🎛 **提示模板**定义灵活的 AI 提示模板
- 📁 **多文件支持**:选择多个文件/文件夹进行 AI 提示或命令
- 🚫 **忽略模式**:使用自定义 glob 规则排除文件/文件夹。
-**快捷键**:设置你偏好的功能快捷键。

Expand All @@ -33,69 +39,6 @@
3. 搜索 “[Aide](https://marketplace.visualstudio.com/items?itemName=nicepkg.aide-pro)
4. 点击安装

## 配置 🛠

查看:[文档](https://github.com/nicepkg/aide/tree/master/docs/configuration/README_CN.md)

## 用法 🚀

### 1. Aide: 代码转换

使用 AI 将选定的代码从一种编程语言转换为另一种。

**使用方法:**

- 在编辑器中选择代码。
- 点击右上角的纸张图标或右键选择 `✨ Aide: 代码转换`

### 2. Aide: 代码查看器助手

使用 AI 为选定的代码添加注释,使其易于初学者阅读。

**使用方法:**

- 在编辑器中选择代码。
- 点击右上角的书本图标或右键选择 `✨ Aide: 代码查看器助手`

### 3. Aide: 复制为 AI Prompt

将选定文件的内容复制到剪贴板,并格式化为 AI 交互提示。

**使用方法:**

- 在资源管理器中选择文件或文件夹。
- 右键选择 `✨ Aide: 复制为 AI Prompt`

### 4. Aide: 问 AI

基于选定的文件和用户输入准备并执行自定义 AI 命令。

**使用方法:**

- 在资源管理器中选择文件或文件夹。
- 右键选择 `✨ Aide: 问 AI`
- 按提示输入您的问题。

### 5. Aide: 重命名变量

使用 AI 给出几个可能的变量名建议以及解释,帮助您更快地重命名变量。

**使用方法:**

- 在编辑器中选择变量。
- 点击右键选择 `✨ Aide: 重命名变量`
- 选择一个建议的变量名。

### 6. 自定义键盘快捷键

为这些命令分配自定义键盘快捷键以更快地访问:

1. 打开键盘快捷键编辑器(`Ctrl+K Ctrl+S``Cmd+K Cmd+S`)。
2. 搜索所需的 Aide 命令。
3. 点击命令旁的加号图标并按下您想要的快捷键组合。

通过 Aide 的 AI 驱动功能提升您的工作效率。立即安装,体验更智能的编码方式!

## 更新日志 📅

查看最新的更新和功能:[更新日志](https://github.com/nicepkg/aide/blob/master/CHANGELOG.md)
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
],
"main": "./dist/node/index.js",
"icon": "res/icon.png",
"files": [
"dist"
],
"engines": {
"vscode": "^1.82.0"
},
Expand Down
4 changes: 2 additions & 2 deletions website/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { DefaultTheme } from 'vitepress'
import { defineConfig } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('../../package.json')
const pkg = require('../../../package.json')

export const en = defineConfig({
lang: 'en-US',
Expand All @@ -27,7 +27,7 @@ function nav(): DefaultTheme.NavItem[] {
return [
{
text: 'Guide',
link: '/guide/index',
link: '/guide/getting-started/',
activeMatch: '/guide/'
},
{
Expand Down
4 changes: 2 additions & 2 deletions website/.vitepress/config/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { DefaultTheme } from 'vitepress'
import { defineConfig } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('../../package.json')
const pkg = require('../../../package.json')

export const zh = defineConfig({
lang: 'zh-Hans',
Expand Down Expand Up @@ -48,7 +48,7 @@ function nav(): DefaultTheme.NavItem[] {
return [
{
text: '指南',
link: '/zh/guide/index',
link: '/zh/guide/getting-started/',
activeMatch: '/zh/guide/'
},
{
Expand Down
6 changes: 5 additions & 1 deletion website/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import DefaultTheme from 'vitepress/theme'
import type { App } from 'vue'

import Video from '../../components/Video.vue'

import 'uno.css'
import './style.css'

export default {
extends: DefaultTheme,
enhanceApp({ app }: { app: App }) {}
enhanceApp({ app }: { app: App }) {
app.component('Video', Video)
}
}
62 changes: 62 additions & 0 deletions website/components/Video.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<template>
<div class="video-container">
<div class="video-bg"></div>
<video ref="video" class="rounded-2xl overflow-hidden w-full h-auto max-h-90vh" autoplay muted playsinline loop
@click="enableControls">
<source :src="src" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</template>

<script setup>
import { ref } from 'vue';
const video = ref(null);
const props = defineProps({
src: {
type: String,
required: true
}
});
const enableControls = () => {
if (video.value) {
video.value.controls = true;
}
};
</script>

<style scoped>
.video-container {
width: 100%;
position: relative;
padding: 0.5rem;
overflow: hidden;
border-radius: 1rem;
}
.video-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 2rem;
z-index: -1;
background-image: linear-gradient(-45deg, #8c6bef 50%, #ef7b95 50%);
filter: blur(44px);
}
@media (min-width: 640px) {
.video-bg {
filter: blur(56px);
}
}
@media (min-width: 960px) {
.video-bg {
filter: blur(68px);
}
}
</style>
3 changes: 3 additions & 0 deletions website/en/guide/configuration/openai-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ This configuration allows you to customize the OpenAI API key. You can obtain yo
"aide.openaiKey": ""
}
```

<br/>
<Video src="/videos/aide-customize-configuration.mp4"/>
2 changes: 2 additions & 0 deletions website/en/guide/features/ask-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Prepare and execute a custom AI command based on the selected file and user inpu
- Right-click and select `✨ Aide: Ask AI`.
- Follow the prompt to enter your question.

<Video src="/videos/aide-ask-ai.mp4"/>

**Related Configuration:**

- You can customize the AI command by modifying the [`aide.aiCommand`](../configuration/ai-command.md) configuration.
Expand Down
2 changes: 2 additions & 0 deletions website/en/guide/features/code-convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Use AI to convert an entire file or selected code from one programming language
If the output is interrupted, you can click the original paper icon or right-click and select `✨ Aide: Code Convert` to continue.
:::

<Video src="/videos/aide-code-convert.mp4"/>

**Related Configuration:**

- By default, the editor will remember your language mappings in the current project's `.vscode/settings.json` file under the [`aide.convertLanguagePairs`](../configuration/convert-language-pairs.md) configuration, so you don't need to select the languages again next time you convert.
Expand Down
2 changes: 2 additions & 0 deletions website/en/guide/features/code-viewer-helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Use AI to add comments to the entire file or selected code to make it easier to
If the output is interrupted, you can click the original book icon or right-click and select `✨ Aide: Code Viewer Helper` to continue.
:::

<Video src="/videos/aide-code-viewer-helper.mp4"/>

**Related Configuration:**

- You can customize the corresponding AI prompt template by configuring [`aide.codeViewerHelperPrompt`](../configuration/code-viewer-helper-prompt.md).
2 changes: 2 additions & 0 deletions website/en/guide/features/copy-as-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Copies the content of the selected files to the clipboard and formats it as AI i
- Select files or folders in the explorer.
- Right-click and select `✨ Aide: Copy as AI Prompt`.

<Video src="/videos/aide-copy-as-prompt.mp4"/>

**Related Configuration:**

- You can customize the AI prompt template by configuring [`aide.aiPrompt`](../configuration/ai-prompt.md).
Expand Down
2 changes: 2 additions & 0 deletions website/en/guide/features/rename-variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ Use AI to provide several possible variable name suggestions along with explanat
::: warning
This feature requires the AI model to support the `function_call` feature.
:::

<Video src="/videos/aide-rename-variable.mp4"/>
2 changes: 2 additions & 0 deletions website/en/guide/features/smart-paste.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Of course, its functionalities are not limited to these examples. Feel free to e

:::

<Video src="/videos/aide-smart-paste.mp4"/>

**Examples:**

- **From `JSON` to `TypeScript` Type**
Expand Down
Loading

0 comments on commit b2dc719

Please sign in to comment.