Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
feat(apps): fill the reasoning slider with dots up to its thumb
leepokaibe77b29e55c5
diff --git a/apps/android/WhatsNew.md b/apps/android/WhatsNew.mdindex 822decde..123b3ec7 100644--- a/apps/android/WhatsNew.md+++ b/apps/android/WhatsNew.md@@ -7,6 +7,13 @@ released version's section; a version without one gets the PRs' "What's New: Andelse a generic "Bug fixes and improvements" line. Delete old sections.-->+## 2.39.1+### zh-Hant+- 推理強度滑桿新增漸層點陣,讓不同強度更容易辨識。++### en-US+- The reasoning effort slider now uses a dotted gradient to make levels easier to distinguish.+## 2.39.0### zh-Hant- 第一次設定時,如果帳號裡已有電腦,可以向它申請訪問,或配對一臺新電腦(例如 VPS)。安裝頁也能一鍵複製網站連結,到電腦上下載。diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ReasoningSlider.kt b/apps/android/app/src/main/kotlin/com/codync/android/ReasoningSlider.ktindex c629c29c..3d2d6dd1 100644--- a/apps/android/app/src/main/kotlin/com/codync/android/ReasoningSlider.kt+++ b/apps/android/app/src/main/kotlin/com/codync/android/ReasoningSlider.kt@@ -13,7 +13,9 @@ import androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.geometry.CornerRadiusimport androidx.compose.ui.geometry.Offset-import androidx.compose.ui.geometry.Size+import androidx.compose.ui.geometry.RoundRect+import androidx.compose.ui.graphics.Path+import androidx.compose.ui.graphics.drawscope.clipPathimport androidx.compose.ui.input.pointer.pointerInputimport androidx.compose.ui.semantics.*import androidx.compose.ui.unit.dp@@ -54,9 +56,9 @@ import kotlin.math.roundToInt}.pointerInput(option.id, option.values) {fun pick(x: Float) {- val radius = 15.dp.toPx()- val travel = (size.width - radius * 2).coerceAtLeast(1f)- val stop = (((x - radius) / travel).coerceIn(0f, 1f) * last).roundToInt()+ val edge = 18.dp.toPx()+ val travel = (size.width - edge * 2).coerceAtLeast(1f)+ val stop = (((x - edge) / travel).coerceIn(0f, 1f) * last).roundToInt()option.values.getOrNull(stop)?.let { chooseCurrent(it.id) }}awaitEachGesture {@@ -65,14 +67,23 @@ import kotlin.math.roundToIntdrag(down.id) { change -> pick(change.position.x); change.consume() }}}) {- val radius = 15.dp.toPx()- val travel = (size.width - radius * 2).coerceAtLeast(0f)+ val edge = 18.dp.toPx()+ val travel = (size.width - edge * 2).coerceAtLeast(0f)val center = size.height / 2- val left = position * travel- drawRoundRect(track, Offset(0f, center - radius), Size(size.width, radius * 2), CornerRadius(radius))- if (index >= 0) drawRoundRect(ink.copy(alpha = .14f), Offset(0f, center - radius), Size(left + radius * 2, radius * 2), CornerRadius(radius))- option.values.indices.forEach { stop -> drawCircle(dots, 2.dp.toPx(), Offset(radius + stop.toFloat() / last * travel, center)) }- if (index >= 0) drawCircle(ink, radius, Offset(radius + left, center))+ val thumbX = edge + position * travel+ drawRoundRect(track, cornerRadius = CornerRadius(edge))+ if (index >= 0) clipPath(Path().apply { addRoundRect(RoundRect(0f, 0f, thumbX + edge, size.height, edge, edge)) }) {+ val spacing = 6.dp.toPx()+ val columns = (size.width / spacing).toInt().coerceAtLeast(1)+ for (column in 0..columns) {+ for (row in 0..5) {+ drawCircle(ink.copy(alpha = .5f * column / columns), 1.dp.toPx(),+ Offset(column * spacing, row * spacing + 3.dp.toPx()))+ }+ }+ }+ option.values.indices.forEach { stop -> drawCircle(dots, 2.dp.toPx(), Offset(edge + stop.toFloat() / last * travel, center)) }+ if (index >= 0) drawCircle(ink, 15.dp.toPx(), Offset(thumbX, center))}}}diff --git a/apps/desktop/src/renderer/views/bots/ReasoningSlider.tsx b/apps/desktop/src/renderer/views/bots/ReasoningSlider.tsxindex 4e708cb5..2f75902d 100644--- a/apps/desktop/src/renderer/views/bots/ReasoningSlider.tsx+++ b/apps/desktop/src/renderer/views/bots/ReasoningSlider.tsx@@ -28,14 +28,14 @@ export function ReasoningSlider({ option, value, onChange, onReset }: {</button></div><div className={`reasoning-slider${index < 0 ? ' unknown' : ''}`} style={{ '--effort-position': last > 0 ? Math.max(0, index) / last : 0 } as CSSProperties}>- <div className="reasoning-track" aria-hidden="true"><div className="reasoning-fill" /></div>+ <div className="reasoning-track" aria-hidden="true"><div className="reasoning-halftone" /></div><div className="reasoning-stops" aria-hidden="true">{option.values.map((level) => <span key={level.id} title={level.name} />)}</div><div className="reasoning-thumb" aria-hidden="true" /><input type="range" min={0} max={Math.max(1, last)} step={1} value={Math.max(0, index)}onPointerDown={(event) => {if (index >= 0 && last > 0) returnconst bounds = event.currentTarget.getBoundingClientRect()- const fraction = Math.max(0, Math.min(1, (event.clientX - bounds.left - 15) / Math.max(1, bounds.width - 30)))+ const fraction = Math.max(0, Math.min(1, (event.clientX - bounds.left - 18) / Math.max(1, bounds.width - 36)))const level = option.values[Math.round(fraction * last)]if (level) onChange(level.id)}}diff --git a/apps/desktop/src/renderer/views/bots/agent-picker.css b/apps/desktop/src/renderer/views/bots/agent-picker.cssindex 9dd62623..67e2ad4a 100644--- a/apps/desktop/src/renderer/views/bots/agent-picker.css+++ b/apps/desktop/src/renderer/views/bots/agent-picker.css@@ -47,16 +47,15 @@.reasoning-value { flex: 1; min-width: 0; text-align: center; overflow-wrap: anywhere; font-size: var(--text-callout); font-weight: 500; color: var(--text); }.reasoning-heading .agent-picker-default { display: flex; align-items: center; gap: 5px; }.reasoning-slider { position: relative; height: 36px; margin-top: 6px; }-.reasoning-track { position: absolute; inset: 3px 0; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface); }-.reasoning-fill { height: 100%; width: calc(15px + (100% - 30px) * var(--effort-position)); background: color-mix(in srgb, var(--text) 14%, var(--surface)); }-.reasoning-stops { position: absolute; inset: 0 15px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }+.reasoning-track { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface); }+.reasoning-halftone { position: absolute; inset: 0; background: var(--text); opacity: .5; mask-image: radial-gradient(circle, #000 1px, transparent 1.2px), linear-gradient(to right, transparent, #000); mask-size: 6px 6px, 100% 100%; mask-composite: intersect; clip-path: inset(0 calc((100% - 36px) * (1 - var(--effort-position))) 0 0 round 18px); transition: clip-path var(--hover), opacity var(--hover); }+.reasoning-stops { position: absolute; inset: 0 16px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }.reasoning-stops > span { width: 4px; height: 4px; border-radius: 50%; background: var(--secondary); }.reasoning-slider input { appearance: none; position: absolute; inset: 0; width: 100%; height: 36px; margin: 0; padding: 0; background: transparent; cursor: pointer; }.reasoning-slider input::-webkit-slider-runnable-track { height: 36px; background: transparent; }-.reasoning-slider input::-webkit-slider-thumb { appearance: none; width: 30px; height: 30px; margin-top: 3px; border-radius: 50%; background: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / .15); }+.reasoning-slider input::-webkit-slider-thumb { appearance: none; width: 36px; height: 36px; border-radius: 50%; background: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / .15); }.reasoning-slider input:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; border-radius: var(--radius-pill); }-.reasoning-slider.unknown input::-webkit-slider-thumb { opacity: 0; }-.reasoning-slider.unknown .reasoning-fill { opacity: 0; }+.reasoning-slider.unknown input::-webkit-slider-thumb, .reasoning-slider.unknown .reasoning-halftone { opacity: 0; }/* Brief feedback for discrete changes; the actual range remains keyboard accessible. */.agent-picker-text-change { display: inline-block; animation: agent-picker-text-in 120ms ease-out; }@@ -64,9 +63,8 @@from { opacity: .35; transform: translateY(2px); }to { opacity: 1; transform: translateY(0); }}-.reasoning-fill { transition: width var(--hover), opacity var(--hover); }.reasoning-thumb {- position: absolute; top: 3px; left: calc((100% - 30px) * var(--effort-position));+ position: absolute; top: 3px; left: calc(3px + (100% - 36px) * var(--effort-position));width: 30px; height: 30px; border-radius: 50%; background: var(--text);box-shadow: 0 1px 4px rgb(0 0 0 / .15); pointer-events: none;transition: left var(--hover), opacity var(--hover);diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/ReasoningSlider.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/ReasoningSlider.swiftindex 9f764dee..e96e7d47 100644--- a/apps/ios/Kit/Sources/CodyncUI/Bots/ReasoningSlider.swift+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/ReasoningSlider.swift@@ -31,25 +31,37 @@ struct ReasoningSlider: View {.font(.caption).foregroundStyle(Palette.secondary).buttonStyle(.plain)}GeometryReader { geometry in- let travel = max(0, geometry.size.width - 30)+ let travel = max(0, geometry.size.width - 36)let last = max(1, option.values.count - 1)let x = CGFloat(index ?? 0) / CGFloat(last) * travelZStack(alignment: .leading) {- Capsule().fill(Palette.surface).frame(height: 30)+ Capsule().fill(Palette.surface).frame(height: 36)if index != nil {- Capsule().fill(Palette.text.opacity(0.14)).frame(width: x + 30, height: 30)+ Canvas { context, size in+ let columns = Int(size.width / 6)+ for column in 0...columns {+ let opacity = 0.5 * Double(column) / Double(max(1, columns))+ for row in 0..<6 {+ let rect = CGRect(x: CGFloat(column) * 6, y: CGFloat(row) * 6 + 2, width: 2, height: 2)+ context.fill(Path(ellipseIn: rect), with: .color(Palette.text.opacity(opacity)))+ }+ }+ }+ .frame(height: 36)+ .mask(alignment: .leading) { Capsule().frame(width: x + 36) }+ .accessibilityHidden(true)}ForEach(option.values.indices, id: \.self) { stop inCircle().fill(Palette.secondary).frame(width: 4, height: 4)- .offset(x: 13 + CGFloat(stop) / CGFloat(last) * travel)+ .offset(x: 16 + CGFloat(stop) / CGFloat(last) * travel)}- if index != nil { Circle().fill(Palette.text).frame(width: 30, height: 30).offset(x: x) }+ if index != nil { Circle().fill(Palette.text).frame(width: 30, height: 30).offset(x: 3 + x) }}.frame(height: 36).contentShape(Rectangle()).gesture(DragGesture(minimumDistance: 0).onChanged { gesture inguard travel > 0 else { return }- let position = min(1, max(0, (gesture.location.x - 15) / travel))+ let position = min(1, max(0, (gesture.location.x - 18) / travel))choose(Int((position * CGFloat(last)).rounded()))}).accessibilityElement(children: .ignore)diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.mdindex b740efad..eb2539dd 100644--- a/apps/ios/WhatsNew.md+++ b/apps/ios/WhatsNew.md@@ -9,6 +9,8 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o## 2.39.1### zh-Hant- 現在會在你從這支 iPhone 送出第五則訊息後,邀請你到 App Store 評分,一年最多兩次。+- 推理強度滑桿新增漸層點陣,讓不同強度更容易辨識。### en-US- Codync now invites you to rate it on the App Store after your fifth message from this iPhone, at most twice a year.+- The reasoning effort slider now uses a dotted gradient to make levels easier to distinguish.