Skip to content

Commit 422dc56

Browse files
committed
feat: add session modes and MCP capabilities support
Change-Id: I5db6760df4ae4f89ebacc3f1cc83f15d95afd0b9 Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 35fcd9d commit 422dc56

File tree

7 files changed

+529
-76
lines changed

7 files changed

+529
-76
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ typescript/docs/
2020

2121
.envrc
2222
.direnv
23+
.rustup/
24+
.cargo/

flake.nix

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,16 @@
2424

2525
formatter = pkgs.nixfmt-rfc-style;
2626

27-
# Rust toolchain derived from rust-toolchain.toml
28-
# Uses oxalica/rust-overlay to match the pinned channel/components.
29-
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
27+
# Use rustup to manage toolchains so `cargo +nightly` works in dev shell
28+
rustup = pkgs.rustup;
3029
in
3130
{
3231
inherit formatter;
3332

3433
devShells.default = pkgs.mkShell {
3534
packages = with pkgs; [
36-
# Rust toolchain pinned via rust-toolchain.toml
37-
rustToolchain
35+
# Rustup manages stable/nightly toolchains according to rust-toolchain.toml
36+
rustup
3837
pkg-config
3938
openssl
4039

@@ -49,6 +48,30 @@
4948
];
5049

5150
RUST_BACKTRACE = "1";
51+
52+
# Ensure rustup shims are used and install required toolchains on first entry
53+
shellHook = ''
54+
export RUSTUP_HOME="$PWD/.rustup"
55+
export CARGO_HOME="$PWD/.cargo"
56+
export PATH="$CARGO_HOME/bin:$PATH"
57+
58+
if ! command -v rustup >/dev/null 2>&1; then
59+
echo "rustup not found in PATH" 1>&2
60+
else
61+
# Install toolchains if missing; respect pinned channel from rust-toolchain.toml
62+
if ! rustup toolchain list | grep -q nightly; then
63+
rustup toolchain install nightly --profile minimal >/dev/null 2>&1 || true
64+
fi
65+
# Ensure stable toolchain from rust-toolchain.toml exists (rustup will auto-select it)
66+
# Attempt to install channel specified in rust-toolchain.toml (fallback to stable)
67+
TOOLCHAIN_CHANNEL=$(sed -n 's/^channel\s*=\s*"\(.*\)"/\1/p' rust-toolchain.toml || true)
68+
if [ -n "$TOOLCHAIN_CHANNEL" ]; then
69+
if ! rustup toolchain list | grep -q "$TOOLCHAIN_CHANNEL"; then
70+
rustup toolchain install "$TOOLCHAIN_CHANNEL" --profile minimal --component rustfmt clippy >/dev/null 2>&1 || true
71+
fi
72+
fi
73+
fi
74+
'';
5275
};
5376
}
5477
);

go/agent_gen.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/client_gen.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/constants_gen.go

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)