From 7447cb3a56ec8716ed8035bcfdf310423c868b45 Mon Sep 17 00:00:00 2001 From: Beyhan Ogur Date: Mon, 11 May 2026 21:30:58 +0300 Subject: [PATCH] feat: update cc-remote.sh to support streaming configuration in settings --- cc-remote.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cc-remote.sh b/cc-remote.sh index c97a41d..09860a4 100755 --- a/cc-remote.sh +++ b/cc-remote.sh @@ -41,6 +41,7 @@ if [[ -z "$GATEWAY_URL" ]]; then fi ANTHROPIC_ENDPOINT="${ANTHROPIC_BASE_URL:-${GATEWAY_URL}/anthropic}" +STREAM_JSON="{\"stream\": ${STREAMING:-false}}" # ── Print mode ── print_env() { @@ -48,6 +49,7 @@ print_env() { echo "│ ANTHROPIC_BASE_URL=${ANTHROPIC_ENDPOINT}" echo "│ ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-${OPENAI_KEY:-}:0:20}... (masked)" echo "│ Gateway: ${GATEWAY_URL}/health" + echo "│ Streaming: ${STREAMING:-false}" echo "└─" } @@ -75,8 +77,7 @@ print_env # ── Claude Code'u başlat ── echo "┌─ Claude Code başlatılıyor (remote gateway)..." echo "│ Gateway: ${ANTHROPIC_ENDPOINT}" -echo "│ Not: Streaming desteklenmiyor. ~/.claude/settings.json'a" -echo '│ "stream": false eklendi.' +echo "│ Streaming: ${STREAMING:-false}" echo "│ Çıkmak için: exit veya Ctrl+C" echo "└─" echo "" @@ -119,7 +120,7 @@ if [[ $EUID -eq 0 ]]; then cd "${ORIG_DIR}" 2>/dev/null || cd "${CLAUD_PROJECT}" export ANTHROPIC_BASE_URL="${ANTHROPIC_ENDPOINT}" export ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-${OPENAI_KEY:-}}" -exec "${CLAUD_BIN}" --settings '{"stream": false}' "\$@" +exec "${CLAUD_BIN}" --settings "${STREAM_JSON}" "\$@" WRAPPER chmod +x "$CLAUD_RUNNER" @@ -135,5 +136,5 @@ else cd "$ORIG_DIR" ANTHROPIC_BASE_URL="${ANTHROPIC_ENDPOINT}" \ ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-${OPENAI_KEY:-}}" \ - claude --settings '{"stream": false}' "$@" + claude --settings "${STREAM_JSON}" "$@" fi