Skip to content

Commit 16de525

Browse files
committed
fix build
1 parent 099f41c commit 16de525

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

build-scripts/build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ def build_linux_minimal(cli_path: pathlib.Path, pty_path: pathlib.Path):
471471
def linux_tauri_config(
472472
cli_path: pathlib.Path,
473473
pty_path: pathlib.Path,
474+
chat_path: pathlib.Path,
474475
dashboard_path: pathlib.Path,
475476
autocomplete_path: pathlib.Path,
476477
vscode_path: pathlib.Path,
@@ -487,6 +488,7 @@ def linux_tauri_config(
487488
"externalBin": [
488489
str(cli_path).removesuffix(f"-{target}"),
489490
str(pty_path).removesuffix(f"-{target}"),
491+
str(chat_path).removesuffix(f"-{target}"),
490492
],
491493
"targets": ["appimage"],
492494
"icon": ["icons/128x128.png"],
@@ -539,6 +541,7 @@ def make_linux_bundle_metadata(packaged_as: Package) -> pathlib.Path:
539541
class LinuxDebResources:
540542
cli_path: pathlib.Path
541543
pty_path: pathlib.Path
544+
chat_path: pathlib.Path
542545
desktop_path: pathlib.Path
543546
themes_path: pathlib.Path
544547
legacy_extension_dir_path: pathlib.Path
@@ -577,6 +580,7 @@ def build_linux_deb(
577580
bin_path.mkdir(parents=True)
578581
shutil.copy(resources.cli_path, bin_path / CLI_BINARY_NAME)
579582
shutil.copy(resources.pty_path, bin_path / PTY_BINARY_NAME)
583+
shutil.copy(resources.chat_path, bin_path / CHAT_BINARY_NAME)
580584
shutil.copy(resources.desktop_path, bin_path / DESKTOP_BINARY_NAME)
581585

582586
info("Copying /usr/share resources")
@@ -633,6 +637,7 @@ def build_linux_full(
633637
release: bool,
634638
cli_path: pathlib.Path,
635639
pty_path: pathlib.Path,
640+
chat_path: pathlib.Path,
636641
npm_packages: NpmBuildOutput,
637642
features: Mapping[str, Sequence[str]] | None = None,
638643
):
@@ -672,6 +677,7 @@ def copy_extension(extension_uuid, extension_dir_name):
672677
linux_tauri_config(
673678
cli_path=cli_path,
674679
pty_path=pty_path,
680+
chat_path=chat_path,
675681
dashboard_path=npm_packages.dashboard_path,
676682
autocomplete_path=npm_packages.autocomplete_path,
677683
vscode_path=npm_packages.vscode_path,
@@ -707,6 +713,7 @@ def copy_extension(extension_uuid, extension_dir_name):
707713
deb_resources = LinuxDebResources(
708714
cli_path=cli_path,
709715
pty_path=pty_path,
716+
chat_path=chat_path,
710717
desktop_path=desktop_path,
711718
themes_path=themes_path,
712719
legacy_extension_dir_path=legacy_extension_dir_path,
@@ -904,6 +911,7 @@ def build(
904911
release=release,
905912
cli_path=cli_path,
906913
pty_path=pty_path,
914+
chat_path=chat_path,
907915
npm_packages=npm_packages,
908916
features=cargo_features,
909917
)

crates/chat-cli/src/cli/chat/tool_manager.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ use super::tools::execute_bash::ExecuteBash;
4242
use super::tools::fs_read::FsRead;
4343
use super::tools::fs_write::FsWrite;
4444
use super::tools::gh_issue::GhIssue;
45+
use super::tools::thinking::Thinking;
4546
use super::tools::use_aws::UseAws;
4647
use super::tools::{
4748
Tool,
@@ -676,7 +677,7 @@ impl ToolManager {
676677
"execute_bash" => Tool::ExecuteBash(serde_json::from_value::<ExecuteBash>(value.args).map_err(map_err)?),
677678
"use_aws" => Tool::UseAws(serde_json::from_value::<UseAws>(value.args).map_err(map_err)?),
678679
"report_issue" => Tool::GhIssue(serde_json::from_value::<GhIssue>(value.args).map_err(map_err)?),
679-
"q_think_tool" => Tool::Thinking(serde_json::from_value::<Think>(value.args).map_err(map_err)?),
680+
"q_think_tool" => Tool::Thinking(serde_json::from_value::<Thinking>(value.args).map_err(map_err)?),
680681
// Note that this name is namespaced with server_name{DELIMITER}tool_name
681682
name => {
682683
let name = self.tn_map.get(name).map_or(name, String::as_str);

crates/chat-cli/src/fig_util/system_info/linux.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pub enum DesktopEnvironment {
2424

2525
#[cfg(target_os = "linux")]
2626
pub fn get_os_release() -> Option<&'static OsRelease> {
27+
use std::sync::OnceLock;
28+
2729
static OS_RELEASE: OnceLock<Option<OsRelease>> = OnceLock::new();
2830
OS_RELEASE.get_or_init(|| OsRelease::load().ok()).as_ref()
2931
}

0 commit comments

Comments
 (0)