Skip to content

0.3.0 — работает с opencode 1.x и 2.x / works with opencode 1.x and 2.x

Choose a tag to compare

@cfyz1297 cfyz1297 released this 04 Nov 20:45
· 119 commits to main since this release

English

0.3.0 — one app for opencode 1.x and 2.x.

Both server generations

The app now speaks the V1 API (opencode 1.18.x, what npm install -g opencode-ai still installs) and the V2 API (opencode 2.x, the native binary). On connect it probes the address once, remembers the answer per connection, and uses the matching transport: /global/health + /global/event for V1, /api/info + /api/event for V2. The probe classifies by response body and content type, never by status code — an unknown route on either generation falls through to the web UI and answers 200 text/html, which is exactly how a V2-only client used to report "connected" on a V1 server and then fail on every request.

Settings → Server → Server API forces v1 or v2 and applies immediately, without a restart. Auto is the default.

Events that only 1.18.x sends (session.idle, permission.updated, and the permission.v2.* names) are normalized; without that, an approval prompt would never appear and the run would hang forever.

Session info

  • The header button is a ring that fills with context usage — blue, amber past 50 %, red past 80 % — instead of a static icon.
  • The panel shows the total spend for the whole session next to the token count and the context percentage. The cost used to be summed over loaded messages, which understates a long session; the server's cumulative total is preferred, and on providers that report no price (opencode-go) the tokens are priced from the model catalog.
  • Prompts per session gains All: the whole transcript, no trimming.

Favorites

A star in each model row pins the model to a "Favorites" section on top of both pickers. Stored on the device (provider and model ids only), shared across connections. A starred model stays in its provider list; a hidden model stays hidden.

Fixes reported from the device

  • Chat no longer loses messages mid-session. "Load older" marked the history complete, and every later refresh replaced the transcript with a page trimmed to the setting — messages vanished until the session was reopened.
  • "Load older" really loads everything. It asked the API without a limit, the server answered its default 50 messages and the history was marked complete, so everything older became unreachable.
  • The stop button is always there during a run, even for a run started elsewhere (app restarted, opened mid-run, another device). A refused interrupt now says so instead of failing silently.
  • Attach and paste can't fail silently anymore, and the reasoning-effort sheet no longer opens behind the keyboard.
  • Tool cards are never blank: the live progress title, the shell tool name and empty outputs are all handled.
  • Sessions in the list are no longer cut off at the server's newest 50 (V2) or 100 (V1) — both transports walk their cursor now.
  • Tunnels work: ngrok and localtunnel no longer answer with their own page instead of the API.

Security

  • Approval and question notifications carry fixed text, never server-supplied tool names, paths or question bodies: the notification shade is readable on a locked phone.
  • No telemetry (Sentry and PostHog are not in the build).
  • Repository renamed to opencode-v1-v2-mobile. The APK file is still opencode-mobile-v2.apk so updates install in place and the release signature check keeps working.

Русский

0.3.0 — одно приложение для opencode 1.x и 2.x.

Оба поколения сервера

Приложение работает и с V1 API (opencode 1.18.x, его до сих пор ставит npm install -g opencode-ai), и с V2 API (opencode 2.x, нативный бинарник). При подключении адрес один раз опрашивается, ответ запоминается для этого подключения, и дальше используется подходящий транспорт: /global/health + /global/event для V1, /api/info + /api/event для V2. Определение идёт по телу и типу ответа, а не по коду: неизвестный маршрут на обоих поколениях проваливается в веб-интерфейс и отвечает 200 text/html — именно поэтому клиент, знавший только V2, показывал «подключено» на V1-сервере и падал на первом же настоящем запросе.

Настройки → Сервер → API сервера принудительно включает v1 или v2 и применяется сразу, без перезапуска. По умолчанию — «Авто».

События, которые присылает только 1.18.x (session.idle, permission.updated и имена permission.v2.*), нормализуются: без этого запрос подтверждения не появился бы, а прогон висел бы вечно.

Информация о сессии

  • Кнопка в заголовке — кольцо, заполняемое по расходу контекста: синее, жёлтое после 50 %, красное после 80 %.
  • В панели: общая стоимость за всю сессию рядом с токенами и процентом контекста. Раньше стоимость суммировалась по загруженным сообщениям и занижалась для длинной сессии; теперь берётся накопленный итог сервера, а на провайдерах без цены (opencode-go) токены ценятся по каталогу модели.
  • В «Промптов на сессию» появился вариант Вся: весь транскрипт без обрезки.

Любимые модели

Звёздочка в строке модели закрепляет её в секции «Любимые» сверху обоих пикеров. Хранится на устройстве (только id провайдера и модели), общее для всех подключений. Любимая модель остаётся и в списке своего провайдера, скрытая — остаётся скрытой.

Исправления по отчётам с устройства

  • Чат больше не теряет сообщения по ходу. «Загрузить старые» помечал историю загруженной, а каждое следующее обновление экрана заменяло переписку страницей, обрезанной до настройки, — сообщения исчезали до перезахода.
  • «Загрузить старые» действительно грузит всё. Запрос шёл без limit, сервер отдавал свои 50 сообщений по умолчанию, и история помечалась загруженной — всё старше становилось недоступным.
  • Кнопка «стоп» есть всегда во время прогона, даже если запуск начат не с этого экрана (приложение перезапускалось, открыли посреди работы, другое устройство). Отказ сервера теперь показывается, а не теряется.
  • Вложение и вставка не могут молча не сработать, а шторка выбора уровня рассуждений больше не открывается за клавиатурой.
  • Карточки инструментов не бывают пустыми: живой заголовок прогресса, имя shell и пустой вывод обрабатываются.
  • Список сессий больше не обрезан 50 (V2) или 100 (V1) последними — оба транспорта идут по курсору.
  • Туннели работают: ngrok и localtunnel больше не отвечают своей страницей вместо API.

Безопасность

  • Уведомления о подтверждении и о вопросе содержат фиксированный текст, а не присланные сервером имена инструментов, пути и текст вопроса: шторка читается с заблокированного телефона.
  • Телеметрии нет (Sentry и PostHog в сборку не входят).
  • Репозиторий переименован в opencode-v1-v2-mobile. Файл APK по-прежнему называется opencode-mobile-v2.apk, чтобы обновление ставилось поверх и проверка подписи продолжала работать.

Install / Установка: download opencode-mobile-v2.apk below and install over the previous version — no uninstall needed. Verify with SHA256SUMS.txt.