-
Notifications
You must be signed in to change notification settings - Fork 0
llm docs; separate thinking #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
|
|
||
| calcit.cirru -diff linguist-generated | ||
| yarn.lock -diff linguist-generated | ||
|
|
||
| Agents.md -diff linguist-generated | ||
| llms/*.md -diff linguist-generated |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -131,7 +131,7 @@ | |||||||||||||||
| .!generateContent (.-models gen-ai) | ||||||||||||||||
| js-object (:model "\"gemini-2.5-flash-image") (:contents content) | ||||||||||||||||
| :config $ js-object | ||||||||||||||||
| :httpOptions $ js-object (:baseUrl "\"https://ja.chenyong.life") | ||||||||||||||||
| :httpOptions $ js-object (:baseUrl |https://ja.chenyong.life) | ||||||||||||||||
| :signal $ let | ||||||||||||||||
| abort $ new js/AbortController | ||||||||||||||||
| reset! *abort-control abort | ||||||||||||||||
|
|
@@ -164,7 +164,7 @@ | |||||||||||||||
| :examples $ [] | ||||||||||||||||
| |call-genai-msg! $ %{} :CodeEntry (:doc |) | ||||||||||||||||
| :code $ quote | ||||||||||||||||
| defn call-genai-msg! (variant cursor state prompt-text search? think? d! *text) (hint-fn async) | ||||||||||||||||
| defn call-genai-msg! (variant cursor state prompt-text search? think? d! *text *thinking-text) (hint-fn async) | ||||||||||||||||
| if (nil? @*gen-ai-new) | ||||||||||||||||
| reset! *gen-ai-new $ new GoogleGenAI | ||||||||||||||||
| js-object $ :apiKey (get-gemini-key!) | ||||||||||||||||
|
|
@@ -200,8 +200,7 @@ | |||||||||||||||
| :thinkingBudget $ get-env "\"think-budget" (if pro? 3200 800) | ||||||||||||||||
| :includeThoughts think? | ||||||||||||||||
| js-object (:thinkingBudget 0) (:includeThoughts false) | ||||||||||||||||
| :httpOptions $ js-object | ||||||||||||||||
| :baseUrl $ get-env "\"gemini-host" "\"https://ja.chenyong.life" | ||||||||||||||||
| :httpOptions $ js-object (:baseUrl |https://ja.chenyong.life) | ||||||||||||||||
| :tools $ let | ||||||||||||||||
| t $ -> | ||||||||||||||||
| js-array | ||||||||||||||||
|
|
@@ -223,17 +222,19 @@ | |||||||||||||||
| js-await $ js-for-await sdk-result | ||||||||||||||||
| fn (? chunk) | ||||||||||||||||
| if (some? chunk) | ||||||||||||||||
| do | ||||||||||||||||
| swap! *text str $ let | ||||||||||||||||
| t $ either (.-text chunk) js/chunk.candidates?.[0]?.content?.parts?.[0]?.text | ||||||||||||||||
| if (nil? t) (js/console.warn "\"empty text in:" chunk) | ||||||||||||||||
| or t (-> chunk .?-promptFeedback .?-blockReason) "\"__BLANK__" | ||||||||||||||||
| d! $ :: :states-merge cursor state | ||||||||||||||||
| {} (:answer @*text) (:loading? false) (:done? false) | ||||||||||||||||
| let | ||||||||||||||||
| part js/chunk.candidates?.[0]?.content?.parts?.[0] | ||||||||||||||||
| is-thinking? $ if (some? part) (.-thought part) false | ||||||||||||||||
| t $ if (some? part) (.-text part) (.-text chunk) | ||||||||||||||||
| let | ||||||||||||||||
| text $ or t (-> chunk .?-promptFeedback .?-blockReason) |__BLANK__ | ||||||||||||||||
|
||||||||||||||||
| text $ or t (-> chunk .?-promptFeedback .?-blockReason) |__BLANK__ | |
| text $ or t (-> chunk .?-promptFeedback .?-blockReason) "\"" |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS property touch-action: none completely disables touch interactions including scrolling on mobile devices. This creates a significant usability issue for mobile users who won't be able to interact with the UI element. Consider using more specific values like touch-action: pan-y or touch-action: manipulation to preserve essential touch interactions while preventing unwanted behaviors.
| :touch-action :none | |
| :touch-action :pan-y |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function signature changed to add *thinking-text parameter, but the calls to call-anthropic-msg! and image-related functions in the submit-message! case statement do not pass this new parameter. This creates an inconsistency where only some model paths support thinking text tracking. Consider either:
- Adding thinking text support to all model handlers, or
- Making
*thinking-textoptional for backward compatibility
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The double-click event handler prevents default behavior globally on the window, which will disable all text selection via double-click across the entire application. This is likely too broad and may harm user experience. Consider:
- Applying this only to specific elements (e.g., buttons, non-text areas)
- Using CSS
user-select: noneon specific elements instead - Removing this if not strictly necessary for the feature
| js/window.addEventListener |dblclick $ fn (event) (.!preventDefault event) |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wheel event listener with passive: false is added to prevent zoom on Ctrl+wheel, but this approach has accessibility implications. Users who rely on browser zoom for accessibility may find this frustrating. Consider:
- Adding a user preference toggle for this behavior
- Only preventing zoom in specific UI areas rather than globally
- Documenting this behavior in user-facing documentation
| if (.-ctrlKey event) (.!preventDefault event) | |
| let | |
| target $ .-target event | |
| when | |
| and (.-ctrlKey event) | |
| some? $ .!closest target "\".app" | |
| .!preventDefault event |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
|
|
||
| {} (:calcit-version |0.9.20) | ||
| {} (:calcit-version |0.10.4) | ||
| :dependencies $ {} (|Respo/alerts.calcit |0.10.2) | ||
| |Respo/reel.calcit |main | ||
| |Respo/respo-markdown.calcit |0.4.11 | ||
| |Respo/respo-ui.calcit |0.6.3 | ||
| |Respo/respo.calcit |0.16.21 | ||
| |Respo/respo.calcit |0.16.22 | ||
| |calcit-lang/lilac |main | ||
| |calcit-lang/memof |main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The baseUrl has been changed from a string literal
"https://ja.chenyong.life"to a symbol|https://ja.chenyong.life. In Cirru syntax, the|prefix denotes a string, which is correct. However, this appears in multiple places (lines 134, 203, 263) and should be consistent. Verify this is the intended format for all three occurrences.