Merge upstream v0.4.0 into Gitea fork
This commit is contained in:
@@ -4,12 +4,12 @@ import { useI18n } from "@/components/i18n";
|
||||
|
||||
import { useCallback, useRef, useState } from "react";
|
||||
import { ChevronRightIcon } from "lucide-react";
|
||||
import { MessageResponse } from "@/components/ai-elements/message";
|
||||
import { ToolContentResponse } from "@/components/ai-elements/message";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { joinDictation, useDictationTarget } from "@/components/dictation";
|
||||
import { useEnterSubmits } from "@/components/enter-submits";
|
||||
import { PathInput } from "@/components/path-input";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { repairMathForDisplay } from "@/src/core";
|
||||
|
||||
/**
|
||||
* The practice dock (practice sessions, owner design 2026-10-04): an
|
||||
@@ -109,10 +109,10 @@ export function PracticeDock({ problemCallId, input, expanded, onExpand, onSubmi
|
||||
cards' label row — owner round, 2026-10-05) + the statement,
|
||||
markdown + LaTeX rendered, capped by the measured column
|
||||
(--dock-max-h; the old fixed 40vh cut long problems short). */}
|
||||
<div className="max-h-[var(--dock-max-h,40vh)] overflow-y-auto px-4 pt-3 pb-2">
|
||||
<div data-dock-scroll-area="" className="max-h-[var(--dock-max-h,40vh)] overflow-y-auto px-4 pt-3 pb-2">
|
||||
<div className="mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground">{t("Problem")}</div>
|
||||
<div className="lh-prose text-[15px]">
|
||||
<MessageResponse>{typeof input.statement === "string" ? repairMathForDisplay(input.statement) : input.statement}</MessageResponse>
|
||||
<ToolContentResponse>{input.statement}</ToolContentResponse>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -123,12 +123,13 @@ export function PracticeDock({ problemCallId, input, expanded, onExpand, onSubmi
|
||||
className="m-1.5 rounded-[10px] border border-border/70 bg-background/60 transition-colors focus-within:border-primary/50"
|
||||
>
|
||||
<div className="px-2.5 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">
|
||||
{t("YOUR THINKING")}</div>
|
||||
<textarea
|
||||
{t("YOUR THINKING")}
|
||||
</div>
|
||||
<PathInput
|
||||
value={thinking}
|
||||
onChange={(e) => {
|
||||
thinkingRef.current = e.target.value;
|
||||
setThinking(e.target.value);
|
||||
onValueChange={(value) => {
|
||||
thinkingRef.current = value;
|
||||
setThinking(value);
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
// Esc ends dictation — stopPropagation claims it (the
|
||||
@@ -147,7 +148,6 @@ export function PracticeDock({ problemCallId, input, expanded, onExpand, onSubmi
|
||||
}
|
||||
}}
|
||||
placeholder={t("Work here, think out loud.")}
|
||||
rows={4}
|
||||
className={cn(
|
||||
"field-sizing-content lh-input max-h-64 min-h-16 w-full resize-none bg-transparent px-2.5 pb-2 outline-none placeholder:text-muted-foreground",
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user