Archived
fix(ui): prevent iOS zoom on custom answers
This commit is contained in:
@@ -2,4 +2,4 @@
|
|||||||
"@jmfederico/pi-web": patch
|
"@jmfederico/pi-web": patch
|
||||||
---
|
---
|
||||||
|
|
||||||
Add an `ask_user` session tool that lets agents post structured question sets as one chat-native browser form. The form uses the transcript's single scroll area, keeps its header visible, and always gives every question a Custom free-text answer. Agents end their run while the form waits; users can submit full or partial answers, unanswered questions are reported explicitly, pending forms survive browser and web/API reconnects, and closed forms remain readable in the transcript. Disable the tool from **Settings → Session daemon**, with `askUser: false`, or with `PI_WEB_ASK_USER=false`.
|
Add an `ask_user` session tool that lets agents post structured question sets as one chat-native browser form. The form uses the transcript's single scroll area, keeps its header visible, and always gives every question a Custom free-text answer with mobile-safe text sizing. Agents end their run while the form waits; users can submit full or partial answers, unanswered questions are reported explicitly, pending forms survive browser and web/API reconnects, and closed forms remain readable in the transcript. Disable the tool from **Settings → Session daemon**, with `askUser: false`, or with `PI_WEB_ASK_USER=false`.
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ describe("ask-user-card live form", () => {
|
|||||||
const textarea = requiredElement(root.querySelector("textarea"), "custom textarea");
|
const textarea = requiredElement(root.querySelector("textarea"), "custom textarea");
|
||||||
const label = requiredElement(textarea.closest("label"), "custom label");
|
const label = requiredElement(textarea.closest("label"), "custom label");
|
||||||
expect(label.textContent).toContain("Custom answer");
|
expect(label.textContent).toContain("Custom answer");
|
||||||
|
expect(getComputedStyle(textarea).fontSize).toBe("16px");
|
||||||
expect(root.activeElement).toBe(textarea);
|
expect(root.activeElement).toBe(textarea);
|
||||||
|
|
||||||
textarea.value = "Svelte";
|
textarea.value = "Svelte";
|
||||||
|
|||||||
@@ -492,8 +492,7 @@ export class AskUserCard extends LitElement {
|
|||||||
background: var(--pi-bg);
|
background: var(--pi-bg);
|
||||||
color: var(--pi-text);
|
color: var(--pi-text);
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font: inherit;
|
font: var(--pi-control-font-size, 16px)/1.4 var(--pi-control-font-family, system-ui, sans-serif);
|
||||||
line-height: 1.4;
|
|
||||||
}
|
}
|
||||||
.form-footer {
|
.form-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user