GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(mobile): untitled subagent rows no longer end in a broken charact… · pingdotgg/t3code@4328d9c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/mobile/src/features/threads
    • threadAgentsPresentation.test.ts
    • threadAgentsPresentation.ts
  • packages/client-runtime/src/state
    • subagentRuntime.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/mobile/src/features/threads/threadAgentsPresentation.test.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/threadAgentsPresentation.test.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,15 @@ describe("resolveSubagentRowPresentation", () => {
6464

6565
it("falls back to a trimmed prompt when the agent has no title", () => {
6666
const long = resolveSubagentRowPresentation({ ...base, prompt: "x".repeat(200) });
67+
const emoji = resolveSubagentRowPresentation({
68+
...base,
69+
prompt: `${"x".repeat(76)}😀 and more`,
70+
});
6771
const titled = resolveSubagentRowPresentation({ ...base, title: "Subagent: /root/my_worker" });
6872

6973
expect(long.title).toHaveLength(80);
7074
expect(long.title.endsWith("...")).toBe(true);
75+
expect(emoji.title).toBe(`${"x".repeat(76)}...`);
7176
expect(titled.title).toBe("My Worker");
7277
});
7378

Collapse file

‎apps/mobile/src/features/threads/threadAgentsPresentation.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/threadAgentsPresentation.ts
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from "@t3tools/client-runtime/state/subagent-display";
88
import {
99
isActiveSubagentStatus,
10+
promptTitle,
1011
type RuntimeSubagent,
1112
type SubagentWorkflowGroup,
1213
} from "@t3tools/client-runtime/state/subagentRuntime";
@@ -22,8 +23,6 @@ import { msg } from "gt-react-native";
2223

2324
import { m, type MessageResolver } from "../../i18n/messages";
2425

25-
const PROMPT_TITLE_LIMIT = 80;
26-
2726
export type SubagentRowTone = "working" | "completed" | "failed" | "stopped";
2827

2928
export interface SubagentRowPresentation {
@@ -82,9 +81,7 @@ function rowTitle(
8281
if (title) return formatSubagentDisplayTitle(title);
8382
const prompt = subagent.prompt.trim();
8483
if (prompt.length === 0) return resolve(msg("Subagent"));
85-
return prompt.length > PROMPT_TITLE_LIMIT
86-
? `${prompt.slice(0, PROMPT_TITLE_LIMIT - 3)}...`
87-
: prompt;
84+
return promptTitle(prompt);
8885
}
8986

9087
function rowTone(status: OrchestrationV2Subagent["status"]): SubagentRowTone {
Collapse file

‎packages/client-runtime/src/state/subagentRuntime.ts‎

Copy file name to clipboardExpand all lines: packages/client-runtime/src/state/subagentRuntime.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function workflowMembersToRuntime(
186186
});
187187
}
188188

189-
function promptTitle(prompt: string): string {
189+
export function promptTitle(prompt: string): string {
190190
if (prompt.length <= 80) return prompt;
191191
let end = 77;
192192
const previous = prompt.charCodeAt(end - 1);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.