-
Notifications
You must be signed in to change notification settings - Fork 0
Chore: crashbox integration #31
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a31cd0e
Initial integration
ryan-roemer f7518be
UI tabs mobile fix
ryan-roemer fdb8879
Add dump on page for crashbox
ryan-roemer 98ac59b
Switch to show dump/recovered only
ryan-roemer d4f5233
More UI work
ryan-roemer d08278c
Gate crash detection behind a setting
ryan-roemer a3c282a
Fix ui scroll on data bars
ryan-roemer 0bc4e65
Merge branch 'main' into chore/crashbox
ryan-roemer 22c13c7
clean up wrapper a bit for cb
ryan-roemer ab69f86
Switch to published crashbox
ryan-roemer df85a5f
feat: budget-aware web-llm memory management + single-model eviction
ryan-roemer 326797a
feat: web-llm memory management, reasoning <think> support, capabilit…
ryan-roemer 548ab1e
Switch to real crashbox. Update thinking helper.
ryan-roemer 271aeef
fix(loading): tear down dynamically-registered resource subscriptions…
ryan-roemer 37c3851
perf+cleanup: single-pass think parsing, memoized model fit, shared C…
ryan-roemer 1d44c09
refactor(loading): gate single-model eviction on SINGLE_MODEL_PROVIDE…
ryan-roemer f9b2826
fix: clickable error-retry in LoadingButton, honest CopyButton succes…
ryan-roemer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,6 @@ tmp-* | |
|
|
||
| # OpenCode plans | ||
| .opencode/plans/ | ||
|
|
||
| # Temp development | ||
| public/vendor/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* global navigator:false, document:false, setTimeout:false */ | ||
| import { useState } from "react"; | ||
| import { html } from "../util/html.js"; | ||
|
|
||
| /** | ||
| * Icon button that copies `text` to the clipboard with a brief check-mark affordance. Falls back to | ||
| * a hidden textarea + execCommand for non-secure contexts / browsers without the async clipboard API | ||
| * (e.g. older WebKit), so the copy still works where `navigator.clipboard` is unavailable. | ||
| * @param {{ text: string, className?: string, title?: string }} props | ||
| */ | ||
| export const CopyButton = ({ | ||
| text, | ||
| className = "answer-actions-btn", | ||
| title = "Copy to clipboard", | ||
| }) => { | ||
| const [copied, setCopied] = useState(false); | ||
| const handleCopy = async () => { | ||
| try { | ||
| await navigator?.clipboard?.writeText(text); | ||
| } catch { | ||
| const ta = document.createElement("textarea"); | ||
| ta.value = text; | ||
| ta.style.position = "fixed"; | ||
| ta.style.opacity = "0"; | ||
| document.body.appendChild(ta); | ||
| ta.select(); | ||
| try { | ||
| document.execCommand("copy"); | ||
| } catch { | ||
| /* clipboard unavailable — nothing else to do */ | ||
| } | ||
| ta.remove(); | ||
| } | ||
| setCopied(true); | ||
| setTimeout(() => setCopied(false), 1500); | ||
| }; | ||
| return html` | ||
| <button | ||
| type="button" | ||
| className=${className} | ||
| onClick=${handleCopy} | ||
| title=${copied ? "Copied!" : title} | ||
| aria-label=${copied ? "Copied!" : title} | ||
| > | ||
| <i className=${copied ? "iconoir-check" : "iconoir-copy"}></i> | ||
| </button> | ||
| `; | ||
| }; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.