npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-path .
gitignore --ignore-path .prettierignore --write
This commit is contained in:
parent
fe1a05042e
commit
4f7ebf0c1b
40 changed files with 274 additions and 254 deletions
|
|
@ -14,21 +14,21 @@ religion, or sexual identity and orientation.
|
|||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ file
|
|||
|
||||

|
||||
|
||||
|
||||
</div>
|
||||
|
||||
## Getting Started
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
const path = require('path');
|
||||
const path = require("path");
|
||||
process.env.CONTINUE_DEVELOPMENT = true;
|
||||
|
||||
process.env.CONTINUE_GLOBAL_DIR = path.join(process.env.PROJECT_DIR, 'extensions', '.continue-debug');
|
||||
process.env.CONTINUE_GLOBAL_DIR = path.join(
|
||||
process.env.PROJECT_DIR,
|
||||
"extensions",
|
||||
".continue-debug",
|
||||
);
|
||||
|
||||
require('./out/index.js');
|
||||
require("./out/index.js");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const logDirPath = path.join(__dirname, '..', 'extensions', '.continue-debug', 'logs');
|
||||
const logDirPath = path.join(
|
||||
__dirname,
|
||||
"..",
|
||||
"extensions",
|
||||
".continue-debug",
|
||||
"logs",
|
||||
);
|
||||
const logFilePath = path.join(logDirPath, "prompt.log");
|
||||
|
||||
// Ensure the log directory exists
|
||||
|
|
@ -12,7 +18,7 @@ if (!fs.existsSync(logDirPath)) {
|
|||
|
||||
// Create the log file if it doesn't exist
|
||||
if (!fs.existsSync(logFilePath)) {
|
||||
fs.writeFileSync(logFilePath, ''); // Create an empty file synchronously
|
||||
fs.writeFileSync(logFilePath, ""); // Create an empty file synchronously
|
||||
console.log("Created empty log file at " + logFilePath);
|
||||
}
|
||||
|
||||
|
|
@ -25,14 +31,16 @@ try {
|
|||
// console.clear();
|
||||
const stream = fs.createReadStream(logFilePath);
|
||||
stream.pipe(process.stdout);
|
||||
stream.on('error', (err) => {
|
||||
console.error('Error reading log file:', err.message);
|
||||
stream.on("error", (err) => {
|
||||
console.error("Error reading log file:", err.message);
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Error while handling file change:', err.message);
|
||||
console.error("Error while handling file change:", err.message);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Error setting up file watcher:', err.message);
|
||||
console.log('You may need to restart the script after the extension generates the first log entry.');
|
||||
console.error("Error setting up file watcher:", err.message);
|
||||
console.log(
|
||||
"You may need to restart the script after the extension generates the first log entry.",
|
||||
);
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ keywords: [blocks, usage, use]
|
|||
# Use a block
|
||||
|
||||
Blocks can be used by adding them to assistants:
|
||||
|
||||
- [Create an assistant](../assistants/create-an-assistant.md)
|
||||
- [Edit an assistant](../assistants/edit-an-assistant.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -83,9 +83,10 @@ the [Continue Explore Page](https://hub.continue.dev/explore/models)
|
|||
|
||||
:::info
|
||||
Local blocks utilizing mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) can read secret values:
|
||||
|
||||
- globally, from a `.env` located in the global `.continue` folder (`~/.continue/.env`)
|
||||
- per-workspace, from a `.env` file located at the root of the current workspace.
|
||||
:::
|
||||
:::
|
||||
|
||||
### Inputs
|
||||
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ HttpContextProvider 创建一个 POST 请求到配置中的 url 。服务器必
|
|||
{
|
||||
"name": "http",
|
||||
"params": {
|
||||
"url": "https://api.example.com/v1/users",
|
||||
"url": "https://api.example.com/v1/users"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -457,6 +457,7 @@ HttpContextProvider 创建一个 POST 请求到配置中的 url 。服务器必
|
|||
```
|
||||
|
||||
接收的 URL 应该接收下面的参数:
|
||||
|
||||
```json title="POST parameters"
|
||||
{
|
||||
query: string,
|
||||
|
|
@ -465,6 +466,7 @@ HttpContextProvider 创建一个 POST 请求到配置中的 url 。服务器必
|
|||
```
|
||||
|
||||
响应 200 OK 应该是一个有以下结构的 JSON 对象:
|
||||
|
||||
```json title="Response"
|
||||
[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SambaNova Cloud
|
||||
|
||||
SambaNova 云是一个运行大型 AI 模型的云平台,有 Llama 3.1 70B/405B 性能的世界记录。你可以在 [这里](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup ) 登录,在最初的欢迎屏幕复制你的 API key ,然后在 [模型列表](https://community.sambanova.ai/t/quick-start-guide/104) 任何模型上点击 play 按钮。
|
||||
SambaNova 云是一个运行大型 AI 模型的云平台,有 Llama 3.1 70B/405B 性能的世界记录。你可以在 [这里](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup) 登录,在最初的欢迎屏幕复制你的 API key ,然后在 [模型列表](https://community.sambanova.ai/t/quick-start-guide/104) 任何模型上点击 play 按钮。
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
|
|||
|
|
@ -2,17 +2,7 @@
|
|||
title: 简介
|
||||
description: 开发者的开源 AI 代码助手
|
||||
slug: /
|
||||
keywords:
|
||||
[
|
||||
continue,
|
||||
AI,
|
||||
代码助手,
|
||||
自动补全,
|
||||
聊天,
|
||||
VS Code,
|
||||
JetBrains,
|
||||
简介,
|
||||
]
|
||||
keywords: [continue, AI, 代码助手, 自动补全, 聊天, VS Code, JetBrains, 简介]
|
||||
---
|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ keywords: [遥测, 匿名, 使用信息, 选择退出]
|
|||
---
|
||||
|
||||
## 概述
|
||||
|
||||
Continue 收集并报告 **匿名** 使用信息,来帮助我们提高产品。这个数据允许我们有效地理解用户交互,并优化用户体验。你可以在任何时候选择退出遥测收集,如果你倾向与不分享你的使用信息。
|
||||
|
||||
我们使用 [Posthog](https://posthog.com/) ,一个产品分析的开源平台,来收集并存储这个数据。为了透明,你可以 [在这里](https://github.com/continuedev/continue/blob/main/gui/src/hooks/CustomPostHogProvider.tsx) 检查实现代码,或者查看我们的 [官方隐私策略](https://continue.dev/privacy) 。
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
--ifm-color-primary-lightest: rgb(67, 31, 242);
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
--ifm-list-item-margin: 0.70rem;
|
||||
--ifm-list-item-margin: 0.7rem;
|
||||
/* These vars control the colors of the kbd tag 3d keycap */
|
||||
--kbd-keycap-bg-color: #ffffffce;
|
||||
--kbd-keycap-border-color: #ccc;
|
||||
--kbd-text-color: #ca3a18;
|
||||
--kbd-shadow-color: #b4b4b4;
|
||||
--kbd-shadow-color-outer: #9c9c9c;
|
||||
--kbd-shadow-tint: rgba(0, 0, 0, .4);
|
||||
--kbd-shadow-tint: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
|
|
@ -47,11 +47,11 @@
|
|||
kbd {
|
||||
display: inline-block;
|
||||
padding: 0.3em 0.4em;
|
||||
margin: 0.1em .4em;
|
||||
margin: 0.1em 0.4em;
|
||||
font-family: var(--ifm-font-family-monospace);
|
||||
font-size: .8rem;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
line-height: .8;
|
||||
line-height: 0.8;
|
||||
color: var(--kbd-text-color);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
|
|
|
|||
13
docs/static/scripts/custom-reo.js
vendored
13
docs/static/scripts/custom-reo.js
vendored
|
|
@ -1 +1,12 @@
|
|||
!function(){var e,t,n;e="7aa28ed11570734",t=function(){Reo.init({clientID:"7aa28ed11570734"})},(n=document.createElement("script")).src="https://static.reo.dev/"+e+"/reo.js",n.async=!0,n.onload=t,document.head.appendChild(n)}();
|
||||
!(function () {
|
||||
var e, t, n;
|
||||
(e = "7aa28ed11570734"),
|
||||
(t = function () {
|
||||
Reo.init({ clientID: "7aa28ed11570734" });
|
||||
}),
|
||||
((n = document.createElement("script")).src =
|
||||
"https://static.reo.dev/" + e + "/reo.js"),
|
||||
(n.async = !0),
|
||||
(n.onload = t),
|
||||
document.head.appendChild(n);
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export const modelDescriptionSchema = z.object({
|
|||
"continue-proxy",
|
||||
"nebius",
|
||||
"scaleway",
|
||||
"watsonx"
|
||||
"watsonx",
|
||||
]),
|
||||
model: z.string(),
|
||||
apiKey: z.string().optional(),
|
||||
|
|
@ -115,7 +115,7 @@ export const embeddingsProviderSchema = z.object({
|
|||
"continue-proxy",
|
||||
"nebius",
|
||||
"scaleway",
|
||||
"watsonx"
|
||||
"watsonx",
|
||||
]),
|
||||
apiBase: z.string().optional(),
|
||||
apiKey: z.string().optional(),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
export default {
|
||||
branches: ['main'],
|
||||
branches: ["main"],
|
||||
plugins: [
|
||||
'@semantic-release/commit-analyzer',
|
||||
'@semantic-release/release-notes-generator',
|
||||
'@semantic-release/npm',
|
||||
'@semantic-release/github',
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/npm",
|
||||
"@semantic-release/github",
|
||||
],
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ describe("E2E Scenarios", () => {
|
|||
);
|
||||
|
||||
const proxyOllamaModel = unrolledConfig.models?.[3]!;
|
||||
expect(proxyOllamaModel.provider).toBe('ollama')
|
||||
expect(proxyOllamaModel.provider).toBe("ollama");
|
||||
expect(proxyOllamaModel.defaultCompletionOptions?.stream).toBe(false);
|
||||
|
||||
expect(unrolledConfig.rules?.length).toBe(2);
|
||||
|
|
|
|||
|
|
@ -50,17 +50,20 @@ export const completionOptionsSchema = z.object({
|
|||
reasoning: z.boolean().optional(),
|
||||
reasoningBudgetTokens: z.number().optional(),
|
||||
promptCaching: z.boolean().optional(),
|
||||
stream: z.boolean().optional()
|
||||
stream: z.boolean().optional(),
|
||||
});
|
||||
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;
|
||||
|
||||
export const embeddingTasksSchema = z.union([
|
||||
z.literal("chunk"),
|
||||
z.literal("query")
|
||||
z.literal("query"),
|
||||
]);
|
||||
export type EmbeddingTasks = z.infer<typeof embeddingTasksSchema>;
|
||||
|
||||
export const embeddingPrefixesSchema = z.record(embeddingTasksSchema, z.string());
|
||||
export const embeddingPrefixesSchema = z.record(
|
||||
embeddingTasksSchema,
|
||||
z.string(),
|
||||
);
|
||||
export type EmbeddingPrefixes = z.infer<typeof embeddingPrefixesSchema>;
|
||||
|
||||
export const cacheBehaviorSchema = z.object({
|
||||
|
|
@ -69,7 +72,6 @@ export const cacheBehaviorSchema = z.object({
|
|||
});
|
||||
export type CacheBehavior = z.infer<typeof cacheBehaviorSchema>;
|
||||
|
||||
|
||||
export const embedOptionsSchema = z.object({
|
||||
maxChunkSize: z.number().optional(),
|
||||
maxBatchSize: z.number().optional(),
|
||||
|
|
@ -79,7 +81,7 @@ export type EmbedOptions = z.infer<typeof embedOptionsSchema>;
|
|||
|
||||
export const chatOptionsSchema = z.object({
|
||||
baseSystemMessage: z.string().optional(),
|
||||
baseAgentSystemMessage: z.string().optional()
|
||||
baseAgentSystemMessage: z.string().optional(),
|
||||
});
|
||||
export type ChatOptions = z.infer<typeof chatOptionsSchema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { zodToJsonSchema } from 'zod-to-json-schema';
|
||||
import { configYamlSchema } from '../schemas/index.js';
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { zodToJsonSchema } from "zod-to-json-schema";
|
||||
import { configYamlSchema } from "../schemas/index.js";
|
||||
|
||||
// Get the directory name of the current module
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
// Convert Zod schema to JSON schema
|
||||
const jsonSchema = zodToJsonSchema(configYamlSchema, {
|
||||
$refStrategy: 'none',
|
||||
name: 'ConfigYaml',
|
||||
$refStrategy: "none",
|
||||
name: "ConfigYaml",
|
||||
});
|
||||
|
||||
// Output directory and file path
|
||||
const outDir = path.resolve(__dirname, '../../schema');
|
||||
const outFile = path.join(outDir, 'config-yaml-schema.json');
|
||||
const outDir = path.resolve(__dirname, "../../schema");
|
||||
const outFile = path.join(outDir, "config-yaml-schema.json");
|
||||
|
||||
// Ensure output directory exists
|
||||
if (!fs.existsSync(outDir)) {
|
||||
|
|
|
|||
20
packages/fetch/jest.globals.d.ts
vendored
20
packages/fetch/jest.globals.d.ts
vendored
|
|
@ -1,14 +1,14 @@
|
|||
// This file declares the Jest globals for TypeScript
|
||||
import '@jest/globals';
|
||||
import "@jest/globals";
|
||||
|
||||
declare global {
|
||||
const describe: typeof import('@jest/globals').describe;
|
||||
const expect: typeof import('@jest/globals').expect;
|
||||
const it: typeof import('@jest/globals').it;
|
||||
const test: typeof import('@jest/globals').test;
|
||||
const beforeAll: typeof import('@jest/globals').beforeAll;
|
||||
const afterAll: typeof import('@jest/globals').afterAll;
|
||||
const beforeEach: typeof import('@jest/globals').beforeEach;
|
||||
const afterEach: typeof import('@jest/globals').afterEach;
|
||||
const jest: typeof import('@jest/globals').jest;
|
||||
const describe: typeof import("@jest/globals").describe;
|
||||
const expect: typeof import("@jest/globals").expect;
|
||||
const it: typeof import("@jest/globals").it;
|
||||
const test: typeof import("@jest/globals").test;
|
||||
const beforeAll: typeof import("@jest/globals").beforeAll;
|
||||
const afterAll: typeof import("@jest/globals").afterAll;
|
||||
const beforeEach: typeof import("@jest/globals").beforeEach;
|
||||
const afterEach: typeof import("@jest/globals").afterEach;
|
||||
const jest: typeof import("@jest/globals").jest;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue