Fix Nix Build (#57)
* fix: fix nix build * refactor: fix cargo script * fix: rust version * refactor: fix desktop app build
This commit is contained in:
@@ -193,7 +193,7 @@ jobs:
|
|||||||
updaterJsonPreferNsis: true
|
updaterJsonPreferNsis: true
|
||||||
releaseId: ${{ needs.publish.outputs.release }}
|
releaseId: ${{ needs.publish.outputs.release }}
|
||||||
tagName: ${{ needs.publish.outputs.tag }}
|
tagName: ${{ needs.publish.outputs.tag }}
|
||||||
releaseAssetNamePattern: opencode-desktop-[platform]-[arch][ext]
|
releaseAssetNamePattern: kilo-desktop-[platform]-[arch][ext]
|
||||||
releaseDraft: true
|
releaseDraft: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "OpenCode development flake";
|
description = "Kilo development flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
@@ -36,34 +36,49 @@
|
|||||||
node_modules = pkgs.callPackage ./nix/node_modules.nix {
|
node_modules = pkgs.callPackage ./nix/node_modules.nix {
|
||||||
inherit rev;
|
inherit rev;
|
||||||
};
|
};
|
||||||
opencode = pkgs.callPackage ./nix/opencode.nix {
|
kilo = pkgs.callPackage ./nix/kilo.nix {
|
||||||
inherit node_modules;
|
inherit node_modules;
|
||||||
};
|
};
|
||||||
desktop = pkgs.callPackage ./nix/desktop.nix {
|
desktop = pkgs.callPackage ./nix/desktop.nix {
|
||||||
inherit opencode;
|
inherit kilo;
|
||||||
};
|
};
|
||||||
# nixpkgs cpu naming to bun cpu naming
|
# nixpkgs cpu naming to bun cpu naming
|
||||||
cpuMap = { x86_64 = "x64"; aarch64 = "arm64"; };
|
cpuMap = {
|
||||||
|
x86_64 = "x64";
|
||||||
|
aarch64 = "arm64";
|
||||||
|
};
|
||||||
# matrix of node_modules builds - these will always fail due to fakeHash usage
|
# matrix of node_modules builds - these will always fail due to fakeHash usage
|
||||||
# but allow computation of the correct hash from any build machine for any cpu/os
|
# but allow computation of the correct hash from any build machine for any cpu/os
|
||||||
# see the update-nix-hashes workflow for usage
|
# see the update-nix-hashes workflow for usage
|
||||||
moduleUpdaters = pkgs.lib.listToAttrs (
|
moduleUpdaters = pkgs.lib.listToAttrs (
|
||||||
pkgs.lib.concatMap (cpu:
|
pkgs.lib.concatMap
|
||||||
map (os: {
|
(
|
||||||
name = "${cpu}-${os}_node_modules";
|
cpu:
|
||||||
value = node_modules.override {
|
map
|
||||||
bunCpu = cpuMap.${cpu};
|
(os: {
|
||||||
bunOs = os;
|
name = "${cpu}-${os}_node_modules";
|
||||||
hash = pkgs.lib.fakeHash;
|
value = node_modules.override {
|
||||||
};
|
bunCpu = cpuMap.${cpu};
|
||||||
}) [ "linux" "darwin" ]
|
bunOs = os;
|
||||||
) [ "x86_64" "aarch64" ]
|
hash = pkgs.lib.fakeHash;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
[
|
||||||
|
"linux"
|
||||||
|
"darwin"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
[
|
||||||
|
"x86_64"
|
||||||
|
"aarch64"
|
||||||
|
]
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = opencode;
|
default = kilo;
|
||||||
inherit opencode desktop;
|
inherit kilo desktop;
|
||||||
} // moduleUpdaters
|
}
|
||||||
|
// moduleUpdaters
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -21,11 +21,11 @@
|
|||||||
openssl,
|
openssl,
|
||||||
webkitgtk_4_1,
|
webkitgtk_4_1,
|
||||||
gst_all_1,
|
gst_all_1,
|
||||||
opencode,
|
kilo,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "opencode-desktop";
|
pname = "kilo-desktop";
|
||||||
inherit (opencode)
|
inherit (kilo)
|
||||||
version
|
version
|
||||||
src
|
src
|
||||||
node_modules
|
node_modules
|
||||||
@@ -72,7 +72,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
patchShebangs packages/desktop/node_modules
|
patchShebangs packages/desktop/node_modules
|
||||||
|
|
||||||
mkdir -p packages/desktop/src-tauri/sidecars
|
mkdir -p packages/desktop/src-tauri/sidecars
|
||||||
cp ${opencode}/bin/opencode packages/desktop/src-tauri/sidecars/opencode-cli-${stdenv.hostPlatform.rust.rustcTarget}
|
cp ${kilo}/bin/kilo packages/desktop/src-tauri/sidecars/kilo-cli-${stdenv.hostPlatform.rust.rustcTarget}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# see publish-tauri job in .github/workflows/publish.yml
|
# see publish-tauri job in .github/workflows/publish.yml
|
||||||
@@ -86,15 +86,15 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||||||
# should be removed once binary is renamed or decided otherwise
|
# should be removed once binary is renamed or decided otherwise
|
||||||
# darwin output is a .app bundle so no conflict
|
# darwin output is a .app bundle so no conflict
|
||||||
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
mv $out/bin/OpenCode $out/bin/opencode-desktop
|
mv $out/bin/Kilo $out/bin/kilo-desktop
|
||||||
sed -i 's|^Exec=OpenCode$|Exec=opencode-desktop|' $out/share/applications/OpenCode.desktop
|
sed -i 's|^Exec=Kilo$|Exec=kilo-desktop|' $out/share/applications/Kilo.desktop
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "OpenCode Desktop App";
|
description = "Kilo Desktop App";
|
||||||
homepage = "https://opencode.ai";
|
homepage = "https://kilo.ai";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
mainProgram = "opencode-desktop";
|
mainProgram = "kilo-desktop";
|
||||||
inherit (opencode.meta) platforms;
|
inherit (kilo.meta) platforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
node_modules ? callPackage ./node-modules.nix { },
|
node_modules ? callPackage ./node-modules.nix { },
|
||||||
}:
|
}:
|
||||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "opencode";
|
pname = "kilo";
|
||||||
inherit (node_modules) version src;
|
inherit (node_modules) version src;
|
||||||
inherit node_modules;
|
inherit node_modules;
|
||||||
|
|
||||||
@@ -50,10 +50,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -Dm755 dist/opencode-*/bin/opencode $out/bin/opencode
|
install -Dm755 dist/@kilocode/cli-*/bin/kilo $out/bin/kilo
|
||||||
install -Dm644 schema.json $out/share/opencode/schema.json
|
install -Dm644 schema.json $out/share/kilo/schema.json
|
||||||
|
|
||||||
wrapProgram $out/bin/opencode \
|
wrapProgram $out/bin/kilo \
|
||||||
--prefix PATH : ${
|
--prefix PATH : ${
|
||||||
lib.makeBinPath (
|
lib.makeBinPath (
|
||||||
[
|
[
|
||||||
@@ -69,9 +69,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
|
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
|
||||||
# trick yargs into also generating zsh completions
|
# trick yargs into also generating zsh completions
|
||||||
installShellCompletion --cmd opencode \
|
installShellCompletion --cmd kilo \
|
||||||
--bash <($out/bin/opencode completion) \
|
--bash <($out/bin/kilo completion) \
|
||||||
--zsh <(SHELL=/bin/zsh $out/bin/opencode completion)
|
--zsh <(SHELL=/bin/zsh $out/bin/kilo completion)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeInstallCheckInputs = [
|
nativeInstallCheckInputs = [
|
||||||
@@ -83,14 +83,14 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
versionCheckProgramArg = "--version";
|
versionCheckProgramArg = "--version";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
jsonschema = "${placeholder "out"}/share/opencode/schema.json";
|
jsonschema = "${placeholder "out"}/share/kilo/schema.json";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The open source coding agent";
|
description = "The open source coding agent";
|
||||||
homepage = "https://opencode.ai/";
|
homepage = "https://kilo.ai/";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
mainProgram = "opencode";
|
mainProgram = "kilo";
|
||||||
inherit (node_modules.meta) platforms;
|
inherit (node_modules.meta) platforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
@@ -18,7 +18,7 @@ let
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
pname = "opencode-node_modules";
|
pname = "kilo-node_modules";
|
||||||
version = "${packageJson.version}-${rev}";
|
version = "${packageJson.version}-${rev}";
|
||||||
|
|
||||||
src = lib.fileset.toSource {
|
src = lib.fileset.toSource {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url"
|
|||||||
*/
|
*/
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
name: "opencode-desktop:config",
|
name: "kilo-desktop:config",
|
||||||
config() {
|
config() {
|
||||||
return {
|
return {
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
@@ -2,19 +2,19 @@ import { APIEvent } from "@solidjs/start"
|
|||||||
import { DownloadPlatform } from "./types"
|
import { DownloadPlatform } from "./types"
|
||||||
|
|
||||||
const assetNames: Record<string, string> = {
|
const assetNames: Record<string, string> = {
|
||||||
"darwin-aarch64-dmg": "opencode-desktop-darwin-aarch64.dmg",
|
"darwin-aarch64-dmg": "kilo-desktop-darwin-aarch64.dmg",
|
||||||
"darwin-x64-dmg": "opencode-desktop-darwin-x64.dmg",
|
"darwin-x64-dmg": "kilo-desktop-darwin-x64.dmg",
|
||||||
"windows-x64-nsis": "opencode-desktop-windows-x64.exe",
|
"windows-x64-nsis": "kilo-desktop-windows-x64.exe",
|
||||||
"linux-x64-deb": "opencode-desktop-linux-amd64.deb",
|
"linux-x64-deb": "kilo-desktop-linux-amd64.deb",
|
||||||
"linux-x64-appimage": "opencode-desktop-linux-amd64.AppImage",
|
"linux-x64-appimage": "kilo-desktop-linux-amd64.AppImage",
|
||||||
"linux-x64-rpm": "opencode-desktop-linux-x86_64.rpm",
|
"linux-x64-rpm": "kilo-desktop-linux-x86_64.rpm",
|
||||||
} satisfies Record<DownloadPlatform, string>
|
} satisfies Record<DownloadPlatform, string>
|
||||||
|
|
||||||
// Doing this on the server lets us preserve the original name for platforms we don't care to rename for
|
// Doing this on the server lets us preserve the original name for platforms we don't care to rename for
|
||||||
const downloadNames: Record<string, string> = {
|
const downloadNames: Record<string, string> = {
|
||||||
"darwin-aarch64-dmg": "OpenCode Desktop.dmg",
|
"darwin-aarch64-dmg": "Kilo Desktop.dmg",
|
||||||
"darwin-x64-dmg": "OpenCode Desktop.dmg",
|
"darwin-x64-dmg": "Kilo Desktop.dmg",
|
||||||
"windows-x64-nsis": "OpenCode Desktop Installer.exe",
|
"windows-x64-nsis": "Kilo Desktop Installer.exe",
|
||||||
} satisfies { [K in DownloadPlatform]?: string }
|
} satisfies { [K in DownloadPlatform]?: string }
|
||||||
|
|
||||||
export async function GET({ params: { platform } }: APIEvent) {
|
export async function GET({ params: { platform } }: APIEvent) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const RUST_TARGET = Bun.env.TAURI_ENV_TARGET_TRIPLE
|
|||||||
|
|
||||||
const sidecarConfig = getCurrentSidecar(RUST_TARGET)
|
const sidecarConfig = getCurrentSidecar(RUST_TARGET)
|
||||||
|
|
||||||
const binaryPath = windowsify(`../opencode/dist/${sidecarConfig.ocBinary}/bin/opencode`)
|
const binaryPath = windowsify(`../opencode/dist/${sidecarConfig.ocBinary}/bin/kilo`) // kilocode_change
|
||||||
|
|
||||||
await $`cd ../opencode && bun run build --single`
|
await $`cd ../opencode && bun run build --single`
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import { copyBinaryToSidecarFolder, getCurrentSidecar, windowsify } from "./util
|
|||||||
|
|
||||||
const sidecarConfig = getCurrentSidecar()
|
const sidecarConfig = getCurrentSidecar()
|
||||||
|
|
||||||
const dir = "src-tauri/target/opencode-binaries"
|
const dir = "src-tauri/target/kilo-binaries"
|
||||||
|
|
||||||
await $`mkdir -p ${dir}`
|
await $`mkdir -p ${dir}`
|
||||||
await $`gh run download ${Bun.env.GITHUB_RUN_ID} -n opencode-cli`.cwd(dir)
|
await $`gh run download ${Bun.env.GITHUB_RUN_ID} -n kilo-cli`.cwd(dir)
|
||||||
|
|
||||||
await copyBinaryToSidecarFolder(windowsify(`${dir}/${sidecarConfig.ocBinary}/bin/opencode`))
|
await copyBinaryToSidecarFolder(windowsify(`${dir}/${sidecarConfig.ocBinary}/bin/kilo`))
|
||||||
|
|||||||
@@ -3,27 +3,27 @@ import { $ } from "bun"
|
|||||||
export const SIDECAR_BINARIES: Array<{ rustTarget: string; ocBinary: string; assetExt: string }> = [
|
export const SIDECAR_BINARIES: Array<{ rustTarget: string; ocBinary: string; assetExt: string }> = [
|
||||||
{
|
{
|
||||||
rustTarget: "aarch64-apple-darwin",
|
rustTarget: "aarch64-apple-darwin",
|
||||||
ocBinary: "opencode-darwin-arm64",
|
ocBinary: "@kilocode/cli-darwin-arm64", // kilocode_change
|
||||||
assetExt: "zip",
|
assetExt: "zip",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rustTarget: "x86_64-apple-darwin",
|
rustTarget: "x86_64-apple-darwin",
|
||||||
ocBinary: "opencode-darwin-x64",
|
ocBinary: "@kilocode/cli-darwin-x64", // kilocode_change
|
||||||
assetExt: "zip",
|
assetExt: "zip",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rustTarget: "x86_64-pc-windows-msvc",
|
rustTarget: "x86_64-pc-windows-msvc",
|
||||||
ocBinary: "opencode-windows-x64",
|
ocBinary: "@kilocode/cli-windows-x64", // kilocode_change
|
||||||
assetExt: "zip",
|
assetExt: "zip",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rustTarget: "x86_64-unknown-linux-gnu",
|
rustTarget: "x86_64-unknown-linux-gnu",
|
||||||
ocBinary: "opencode-linux-x64",
|
ocBinary: "@kilocode/cli-linux-x64", // kilocode_change
|
||||||
assetExt: "tar.gz",
|
assetExt: "tar.gz",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
rustTarget: "aarch64-unknown-linux-gnu",
|
rustTarget: "aarch64-unknown-linux-gnu",
|
||||||
ocBinary: "opencode-linux-arm64",
|
ocBinary: "@kilocode/cli-linux-arm64", // kilocode_change
|
||||||
assetExt: "tar.gz",
|
assetExt: "tar.gz",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -41,7 +41,7 @@ export function getCurrentSidecar(target = RUST_TARGET) {
|
|||||||
|
|
||||||
export async function copyBinaryToSidecarFolder(source: string, target = RUST_TARGET) {
|
export async function copyBinaryToSidecarFolder(source: string, target = RUST_TARGET) {
|
||||||
await $`mkdir -p src-tauri/sidecars`
|
await $`mkdir -p src-tauri/sidecars`
|
||||||
const dest = windowsify(`src-tauri/sidecars/opencode-cli-${target}`)
|
const dest = windowsify(`src-tauri/sidecars/kilo-cli-${target}`) // kilocode_change
|
||||||
await $`cp ${source} ${dest}`
|
await $`cp ${source} ${dest}`
|
||||||
|
|
||||||
console.log(`Copied ${source} to ${dest}`)
|
console.log(`Copied ${source} to ${dest}`)
|
||||||
|
|||||||
Generated
+33
-33
@@ -2256,6 +2256,39 @@ dependencies = [
|
|||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kilo-desktop"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"comrak",
|
||||||
|
"futures",
|
||||||
|
"gtk",
|
||||||
|
"listeners",
|
||||||
|
"reqwest",
|
||||||
|
"semver",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tauri",
|
||||||
|
"tauri-build",
|
||||||
|
"tauri-plugin-clipboard-manager",
|
||||||
|
"tauri-plugin-decorum",
|
||||||
|
"tauri-plugin-dialog",
|
||||||
|
"tauri-plugin-http",
|
||||||
|
"tauri-plugin-notification",
|
||||||
|
"tauri-plugin-opener",
|
||||||
|
"tauri-plugin-os",
|
||||||
|
"tauri-plugin-process",
|
||||||
|
"tauri-plugin-shell",
|
||||||
|
"tauri-plugin-single-instance",
|
||||||
|
"tauri-plugin-store",
|
||||||
|
"tauri-plugin-updater",
|
||||||
|
"tauri-plugin-window-state",
|
||||||
|
"tokio",
|
||||||
|
"uuid",
|
||||||
|
"webkit2gtk",
|
||||||
|
"windows 0.61.3",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kuchikiki"
|
name = "kuchikiki"
|
||||||
version = "0.8.8-speedreader"
|
version = "0.8.8-speedreader"
|
||||||
@@ -3020,39 +3053,6 @@ dependencies = [
|
|||||||
"pathdiff",
|
"pathdiff",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "opencode-desktop"
|
|
||||||
version = "0.0.0"
|
|
||||||
dependencies = [
|
|
||||||
"comrak",
|
|
||||||
"futures",
|
|
||||||
"gtk",
|
|
||||||
"listeners",
|
|
||||||
"reqwest",
|
|
||||||
"semver",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tauri",
|
|
||||||
"tauri-build",
|
|
||||||
"tauri-plugin-clipboard-manager",
|
|
||||||
"tauri-plugin-decorum",
|
|
||||||
"tauri-plugin-dialog",
|
|
||||||
"tauri-plugin-http",
|
|
||||||
"tauri-plugin-notification",
|
|
||||||
"tauri-plugin-opener",
|
|
||||||
"tauri-plugin-os",
|
|
||||||
"tauri-plugin-process",
|
|
||||||
"tauri-plugin-shell",
|
|
||||||
"tauri-plugin-single-instance",
|
|
||||||
"tauri-plugin-store",
|
|
||||||
"tauri-plugin-updater",
|
|
||||||
"tauri-plugin-window-state",
|
|
||||||
"tokio",
|
|
||||||
"uuid",
|
|
||||||
"webkit2gtk",
|
|
||||||
"windows 0.61.3",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "option-ext"
|
name = "option-ext"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "opencode-desktop"
|
name = "kilo-desktop"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
description = "The open source AI coding agent"
|
description = "The open source AI coding agent"
|
||||||
authors = ["Anomaly Innovations"]
|
authors = ["Kilo"]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
@@ -11,7 +11,7 @@ edition = "2024"
|
|||||||
# The `_lib` suffix may seem redundant but it is necessary
|
# The `_lib` suffix may seem redundant but it is necessary
|
||||||
# to make the lib name unique and wouldn't conflict with the bin name.
|
# to make the lib name unique and wouldn't conflict with the bin name.
|
||||||
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
||||||
name = "opencode_lib"
|
name = "kilo_lib"
|
||||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>ai.opencode.opencode</id>
|
<id>ai.kilo.kilo</id>
|
||||||
|
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>MIT</project_license>
|
<project_license>MIT</project_license>
|
||||||
|
|
||||||
<name>OpenCode</name>
|
<name>Kilo</name>
|
||||||
<summary>Open source AI coding agent</summary>
|
<summary>Open source AI coding agent</summary>
|
||||||
|
|
||||||
<developer id="ly.anoma">
|
<developer id="ly.anoma">
|
||||||
@@ -14,21 +14,21 @@
|
|||||||
|
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
OpenCode is an open source agent that helps you write and run code with any AI model.
|
Kilo is an open source agent that helps you write and run code with any AI model.
|
||||||
</p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<launchable type="desktop-id">ai.opencode.opencode.desktop</launchable>
|
<launchable type="desktop-id">ai.kilo.kilo.desktop</launchable>
|
||||||
|
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
|
|
||||||
<url type="bugtracker">https://github.com/Kilo-Org/kilo/issues</url>
|
<url type="bugtracker">https://github.com/Kilo-Org/kilo/issues</url>
|
||||||
<url type="homepage">https://opencode.ai</url>
|
<url type="homepage">https://kilo.ai</url>
|
||||||
<url type="vcs-browser">https://github.com/Kilo-Org/kilo</url>
|
<url type="vcs-browser">https://github.com/Kilo-Org/kilo</url>
|
||||||
|
|
||||||
<screenshots>
|
<screenshots>
|
||||||
<screenshot type="default">
|
<screenshot type="default">
|
||||||
<image>https://opencode.ai/docs/_astro/screenshot.Bs5D4atL_ZvsvFu.webp</image>
|
<image>https://kilo.ai/docs/_astro/screenshot.Bs5D4atL_ZvsvFu.webp</image>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use tauri::{AppHandle, Manager, path::BaseDirectory};
|
use tauri::{AppHandle, Manager, path::BaseDirectory};
|
||||||
use tauri_plugin_shell::{ShellExt, process::Command};
|
use tauri_plugin_shell::{ShellExt, process::Command};
|
||||||
|
|
||||||
const CLI_INSTALL_DIR: &str = ".opencode/bin";
|
const CLI_INSTALL_DIR: &str = ".kilo/bin"; // kilocode_change
|
||||||
const CLI_BINARY_NAME: &str = "opencode";
|
const CLI_BINARY_NAME: &str = "kilo"; // kilocode_change
|
||||||
|
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
pub struct ServerConfig {
|
pub struct ServerConfig {
|
||||||
@@ -39,7 +39,7 @@ pub fn get_sidecar_path(app: &tauri::AppHandle) -> std::path::PathBuf {
|
|||||||
.expect("Failed to get current binary")
|
.expect("Failed to get current binary")
|
||||||
.parent()
|
.parent()
|
||||||
.expect("Failed to get parent dir")
|
.expect("Failed to get parent dir")
|
||||||
.join("opencode-cli")
|
.join("kilo-cli") // kilocode_change
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_cli_installed() -> bool {
|
fn is_cli_installed() -> bool {
|
||||||
@@ -61,7 +61,7 @@ pub fn install_cli(app: tauri::AppHandle) -> Result<String, String> {
|
|||||||
return Err("Sidecar binary not found".to_string());
|
return Err("Sidecar binary not found".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
let temp_script = std::env::temp_dir().join("opencode-install.sh");
|
let temp_script = std::env::temp_dir().join("kilo-install.sh"); // kilocode_change
|
||||||
std::fs::write(&temp_script, INSTALL_SCRIPT)
|
std::fs::write(&temp_script, INSTALL_SCRIPT)
|
||||||
.map_err(|e| format!("Failed to write install script: {}", e))?;
|
.map_err(|e| format!("Failed to write install script: {}", e))?;
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ pub fn create_command(app: &tauri::AppHandle, args: &str) -> Command {
|
|||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
return app
|
return app
|
||||||
.shell()
|
.shell()
|
||||||
.sidecar("opencode-cli")
|
.sidecar("kilo-cli")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.args(args.split_whitespace())
|
.args(args.split_whitespace())
|
||||||
.env("OPENCODE_EXPERIMENTAL_ICON_DISCOVERY", "true")
|
.env("OPENCODE_EXPERIMENTAL_ICON_DISCOVERY", "true")
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use tokio::sync::oneshot;
|
|||||||
|
|
||||||
use crate::window_customizer::PinchZoomDisablePlugin;
|
use crate::window_customizer::PinchZoomDisablePlugin;
|
||||||
|
|
||||||
const SETTINGS_STORE: &str = "opencode.settings.dat";
|
const SETTINGS_STORE: &str = "kilo.settings.dat"; // kilocode_change
|
||||||
const DEFAULT_SERVER_URL_KEY: &str = "defaultServerUrl";
|
const DEFAULT_SERVER_URL_KEY: &str = "defaultServerUrl";
|
||||||
|
|
||||||
#[derive(Clone, serde::Serialize)]
|
#[derive(Clone, serde::Serialize)]
|
||||||
@@ -252,7 +252,7 @@ pub fn run() {
|
|||||||
|
|
||||||
#[cfg(all(target_os = "macos", not(debug_assertions)))]
|
#[cfg(all(target_os = "macos", not(debug_assertions)))]
|
||||||
let _ = std::process::Command::new("killall")
|
let _ = std::process::Command::new("killall")
|
||||||
.arg("opencode-cli")
|
.arg("kilo-cli") // kilocode_change
|
||||||
.output();
|
.output();
|
||||||
|
|
||||||
let mut builder = tauri::Builder::default()
|
let mut builder = tauri::Builder::default()
|
||||||
|
|||||||
@@ -61,5 +61,5 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opencode_lib::run()
|
kilo_lib::run() // kilocode_change
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "OpenCode Dev",
|
"productName": "Kilo Dev",
|
||||||
"identifier": "ai.opencode.desktop.dev",
|
"identifier": "ai.kilo.desktop.dev",
|
||||||
"mainBinaryName": "OpenCode",
|
"mainBinaryName": "Kilo",
|
||||||
"version": "../package.json",
|
"version": "../package.json",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "bun run dev",
|
"beforeDevCommand": "bun run dev",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
{
|
{
|
||||||
"label": "main",
|
"label": "main",
|
||||||
"create": false,
|
"create": false,
|
||||||
"title": "OpenCode",
|
"title": "Kilo",
|
||||||
"url": "/",
|
"url": "/",
|
||||||
"decorations": true,
|
"decorations": true,
|
||||||
"dragDropEnabled": false,
|
"dragDropEnabled": false,
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
],
|
],
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": ["deb", "rpm", "dmg", "nsis", "app"],
|
"targets": ["deb", "rpm", "dmg", "nsis", "app"],
|
||||||
"externalBin": ["sidecars/opencode-cli"],
|
"externalBin": ["sidecars/kilo-cli"],
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"entitlements": "./entitlements.plist"
|
"entitlements": "./entitlements.plist"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "OpenCode",
|
"productName": "Kilo",
|
||||||
"identifier": "ai.opencode.desktop",
|
"identifier": "ai.kilo.desktop",
|
||||||
"app": {
|
"app": {
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"label": "main",
|
"label": "main",
|
||||||
"create": false,
|
"create": false,
|
||||||
"title": "OpenCode",
|
"title": "Kilo",
|
||||||
"url": "/",
|
"url": "/",
|
||||||
"decorations": true,
|
"decorations": true,
|
||||||
"dragDropEnabled": false,
|
"dragDropEnabled": false,
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"linux": {
|
"linux": {
|
||||||
"deb": {
|
"deb": {
|
||||||
"files": {
|
"files": {
|
||||||
"/usr/share/metainfo/ai.opencode.opencode.metainfo.xml": "release/appstream.metainfo.xml"
|
"/usr/share/metainfo/ai.kilo.kilo.metainfo.xml": "release/appstream.metainfo.xml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ import { message } from "@tauri-apps/plugin-dialog"
|
|||||||
export async function installCli(): Promise<void> {
|
export async function installCli(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const path = await invoke<string>("install_cli")
|
const path = await invoke<string>("install_cli")
|
||||||
await message(`CLI installed to ${path}\n\nRestart your terminal to use the 'opencode' command.`, {
|
// kilocode_change start
|
||||||
|
await message(`CLI installed to ${path}\n\nRestart your terminal to use the 'kilo' command.`, {
|
||||||
title: "CLI Installed",
|
title: "CLI Installed",
|
||||||
})
|
})
|
||||||
|
// kilocode_change end
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await message(`Failed to install CLI: ${e}`, { title: "Installation Failed" })
|
await message(`Failed to install CLI: ${e}`, { title: "Installation Failed" })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
"zod-to-json-schema": "3.24.5"
|
"zod-to-json-schema": "3.24.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kilocode/kilo-telemetry": "workspace:*",
|
|
||||||
"@actions/core": "1.11.1",
|
"@actions/core": "1.11.1",
|
||||||
"@actions/github": "6.0.1",
|
"@actions/github": "6.0.1",
|
||||||
"@agentclientprotocol/sdk": "0.12.0",
|
"@agentclientprotocol/sdk": "0.12.0",
|
||||||
@@ -75,13 +74,14 @@
|
|||||||
"@hono/standard-validator": "0.1.5",
|
"@hono/standard-validator": "0.1.5",
|
||||||
"@hono/zod-validator": "catalog:",
|
"@hono/zod-validator": "catalog:",
|
||||||
"@kilocode/kilo-gateway": "workspace:*",
|
"@kilocode/kilo-gateway": "workspace:*",
|
||||||
|
"@kilocode/kilo-telemetry": "workspace:*",
|
||||||
|
"@kilocode/sdk": "workspace:*",
|
||||||
"@modelcontextprotocol/sdk": "1.25.2",
|
"@modelcontextprotocol/sdk": "1.25.2",
|
||||||
"@octokit/graphql": "9.0.2",
|
"@octokit/graphql": "9.0.2",
|
||||||
"@octokit/rest": "catalog:",
|
"@octokit/rest": "catalog:",
|
||||||
"@openauthjs/openauth": "catalog:",
|
"@openauthjs/openauth": "catalog:",
|
||||||
"@opencode-ai/plugin": "workspace:*",
|
"@opencode-ai/plugin": "workspace:*",
|
||||||
"@opencode-ai/script": "workspace:*",
|
"@opencode-ai/script": "workspace:*",
|
||||||
"@kilocode/sdk": "workspace:*",
|
|
||||||
"@opencode-ai/util": "workspace:*",
|
"@opencode-ai/util": "workspace:*",
|
||||||
"@openrouter/ai-sdk-provider": "1.5.2",
|
"@openrouter/ai-sdk-provider": "1.5.2",
|
||||||
"@opentui/core": "0.1.74",
|
"@opentui/core": "0.1.74",
|
||||||
|
|||||||
Reference in New Issue
Block a user