Merge branch 'main' into allow-skip-ollama-onboarding
This commit is contained in:
commit
6e7238a053
12 changed files with 41 additions and 13 deletions
1
.github/workflows/pr_checks.yaml
vendored
1
.github/workflows/pr_checks.yaml
vendored
|
|
@ -374,6 +374,7 @@ jobs:
|
|||
- name: Type check and lint
|
||||
run: |
|
||||
cd extensions/vscode
|
||||
npm run write-build-timestamp
|
||||
npx tsc --noEmit
|
||||
npm run lint
|
||||
|
||||
|
|
|
|||
2
binary/package-lock.json
generated
2
binary/package-lock.json
generated
|
|
@ -48,7 +48,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.777.0",
|
||||
"@aws-sdk/credential-providers": "^3.778.0",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.77",
|
||||
"@continuedev/config-yaml": "file:../packages/config-yaml",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.8",
|
||||
"@continuedev/openai-adapters": "^1.0.18",
|
||||
|
|
|
|||
1
extensions/vscode/.gitignore
vendored
1
extensions/vscode/.gitignore
vendored
|
|
@ -3,6 +3,7 @@ node_modules/
|
|||
out/
|
||||
.vscode-test/
|
||||
data/
|
||||
src/.buildTimestamp.ts
|
||||
src/client
|
||||
.continue
|
||||
|
||||
|
|
|
|||
|
|
@ -607,6 +607,7 @@
|
|||
"build-test": "npm run esbuild && node esbuild.test.mjs",
|
||||
"test": "npm run build-test && node ./out/runTestOnVSCodeHost.js",
|
||||
"quick-test": "npm run build-test && node ./out/runTestOnVSCodeHost.js",
|
||||
"write-build-timestamp": "node scripts/write-build-timestamp.js",
|
||||
"prepackage": "node scripts/prepackage.js",
|
||||
"package": "node scripts/package.js",
|
||||
"package-all": "node scripts/package-all.js",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const fs = require("fs");
|
||||
const { writeBuildTimestamp } = require("./utils");
|
||||
|
||||
const esbuild = require("esbuild");
|
||||
|
||||
|
|
@ -49,6 +50,8 @@ const esbuildConfig = {
|
|||
};
|
||||
|
||||
(async () => {
|
||||
// Create .buildTimestamp.js before starting the first build
|
||||
writeBuildTimestamp();
|
||||
// Bundles the extension into one file
|
||||
if (flags.includes("--watch")) {
|
||||
const ctx = await esbuild.context(esbuildConfig);
|
||||
|
|
@ -74,7 +77,7 @@ const esbuildConfig = {
|
|||
});
|
||||
|
||||
console.log("Triggering VS Code Extension esbuild rebuild...");
|
||||
fs.utimesSync(inFile, new Date(), new Date());
|
||||
writeBuildTimestamp();
|
||||
} else {
|
||||
await esbuild.build(esbuildConfig);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const {
|
|||
autodetectPlatformAndArch,
|
||||
} = require("../../../scripts/util/index");
|
||||
|
||||
const { copyConfigSchema } = require("./utils");
|
||||
const { copyConfigSchema, writeBuildTimestamp } = require("./utils");
|
||||
|
||||
// Clear folders that will be packaged to ensure clean slate
|
||||
rimrafSync(path.join(__dirname, "..", "bin"));
|
||||
|
|
@ -71,6 +71,9 @@ const isMacTarget = target?.startsWith("darwin");
|
|||
process.chdir("extensions/vscode");
|
||||
}
|
||||
|
||||
// Make sure we have an initial timestamp file
|
||||
writeBuildTimestamp();
|
||||
|
||||
// Install node_modules //
|
||||
execCmdSync("npm install");
|
||||
console.log("[info] npm install in extensions/vscode completed");
|
||||
|
|
|
|||
|
|
@ -511,6 +511,20 @@ async function copyScripts() {
|
|||
console.log("[info] Copied script files");
|
||||
}
|
||||
|
||||
// We can't simply touch one of our files to trigger a rebuild, because
|
||||
// esbuild doesn't always use modifications times to detect changes -
|
||||
// for example, if it finds a file changed within the last 3 seconds,
|
||||
// it will fall back to full-contents-comparison for that file
|
||||
//
|
||||
// So to facilitate development workflows, we always include a timestamp string
|
||||
// in the build
|
||||
function writeBuildTimestamp() {
|
||||
fs.writeFileSync(
|
||||
"src/.buildTimestamp.ts",
|
||||
`export default "${new Date().toISOString()}";\n`,
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
copyConfigSchema,
|
||||
installNodeModules,
|
||||
|
|
@ -526,4 +540,5 @@ module.exports = {
|
|||
downloadRipgrepBinary,
|
||||
copyTokenizers,
|
||||
copyScripts,
|
||||
writeBuildTimestamp,
|
||||
};
|
||||
|
|
|
|||
3
extensions/vscode/scripts/write-build-timestamp.js
Normal file
3
extensions/vscode/scripts/write-build-timestamp.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
const { writeBuildTimestamp } = require("./utils");
|
||||
|
||||
writeBuildTimestamp();
|
||||
|
|
@ -8,6 +8,7 @@ import { Telemetry } from "core/util/posthog";
|
|||
import * as vscode from "vscode";
|
||||
|
||||
import { getExtensionVersion } from "./util/util";
|
||||
export { default as buildTimestamp } from "./.buildTimestamp";
|
||||
|
||||
async function dynamicImportAndActivate(context: vscode.ExtensionContext) {
|
||||
await setupCa();
|
||||
|
|
|
|||
2
gui/package-lock.json
generated
2
gui/package-lock.json
generated
|
|
@ -206,7 +206,7 @@
|
|||
},
|
||||
"../packages/config-yaml": {
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.79",
|
||||
"version": "1.0.78",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
|
|
|
|||
|
|
@ -134,10 +134,10 @@ export function ExpandableToolbarPreview(props: ExpandableToolbarPreviewProps) {
|
|||
|
||||
useEffect(() => {
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
setContentDims({
|
||||
width: contentRef.current?.scrollWidth ?? 0,
|
||||
height: contentRef.current?.scrollHeight ?? 0,
|
||||
});
|
||||
setContentDims(prevValue => ({
|
||||
width: contentRef.current?.scrollWidth ?? prevValue.width,
|
||||
height: contentRef.current?.scrollHeight ?? prevValue.height,
|
||||
}));
|
||||
});
|
||||
|
||||
if (contentRef.current) {
|
||||
|
|
|
|||
|
|
@ -100,9 +100,9 @@ const AssistantSelectOption = ({
|
|||
}}
|
||||
>
|
||||
<div className="flex w-full items-center justify-between gap-2 bg-transparent">
|
||||
<div className="flex w-full items-center gap-1.5">
|
||||
<div className="flex w-full items-center gap-1">
|
||||
<div className="flex h-4 w-4 flex-shrink-0">
|
||||
<AssistantIcon assistant={profile} />
|
||||
<AssistantIcon size={3.5} assistant={profile} />
|
||||
</div>
|
||||
<span
|
||||
className={`line-clamp-1 flex-1 ${selected ? "font-semibold" : ""}`}
|
||||
|
|
@ -291,7 +291,7 @@ export default function AssistantSelect() {
|
|||
|
||||
<Transition>
|
||||
<ListboxOptions className="pb-0">
|
||||
<div className="flex gap-1.5 px-2.5 py-1">
|
||||
<div className="flex justify-between gap-1.5 px-2.5 py-1">
|
||||
<span>Assistants</span>
|
||||
<div
|
||||
className="flex cursor-pointer flex-row items-center gap-1 hover:brightness-125"
|
||||
|
|
@ -301,7 +301,7 @@ export default function AssistantSelect() {
|
|||
buttonRef.current?.click();
|
||||
}}
|
||||
>
|
||||
<ArrowPathIcon className="h-2.5 w-2.5" />
|
||||
<ArrowPathIcon className="text-lightgray h-2.5 w-2.5" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -375,7 +375,7 @@ export default function AssistantSelect() {
|
|||
{currentOrg?.iconUrl ? (
|
||||
<img
|
||||
src={currentOrg.iconUrl}
|
||||
className="h-3 w-3 rounded-full"
|
||||
className="h-2.5 w-2.5 rounded-full"
|
||||
/>
|
||||
) : (
|
||||
<BuildingOfficeIcon className="h-4 w-4" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue