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(web): restore the composer's start-from menu button (#452) · adampeterhiggins/t3code@cf8d864

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components/chat
    • ChatComposer.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/chat/ChatComposer.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/chat/ChatComposer.tsx
+37-3Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,9 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:
10061006
);
10071007
}
10081008
import { toastManager } from "../ui/toast";
1009-
import { CircleAlertIcon, PlayIcon, ShieldIcon } from "lucide-react";
1009+
import { Button } from "../ui/button";
1010+
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
1011+
import { CircleAlertIcon, EllipsisIcon, PlayIcon, ShieldIcon } from "lucide-react";
10101012
import { proposedPlanTitle } from "@t3tools/shared/proposedPlanText";
10111013
import { hasProviderSetup } from "./ProviderStatusBanner";
10121014
import {
@@ -1265,7 +1267,8 @@ export interface ChatComposerProps {
12651267
isLocalDraftThread: boolean;
12661268
forceExpandedOnMobile: boolean;
12671269
projectSelectionRequired: boolean;
1268-
1270+
/** Present on the new-thread splash: opens the "start from PR, branch, or issue" picker. */
1271+
onStartFrom?: () => void;
12691272
phase: SessionPhase;
12701273
canInterrupt: boolean;
12711274
isConnecting: boolean;
@@ -1702,6 +1705,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
17021705
isLocalDraftThread: _isLocalDraftThread,
17031706
forceExpandedOnMobile,
17041707
projectSelectionRequired,
1708+
onStartFrom,
17051709
phase,
17061710
canInterrupt,
17071711
isConnecting,
@@ -4785,6 +4789,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
47854789
composerSubmissionError !== null ||
47864790
providerInputSubmissionError !== null ||
47874791
hasImageAttachmentAttention;
4792+
const startFromShortcutLabel = onStartFrom
4793+
? shortcutLabelForCommand(keybindings, "chat.startFrom", {
4794+
context: { terminalFocus: false, terminalOpen, modelPickerOpen: false },
4795+
})
4796+
: null;
47884797
const isComposerResting = shouldUseRestingComposerLayout({
47894798
isExistingThread: routeKind === "server" && activeThreadId !== null,
47904799
isMobileViewport,
@@ -6886,6 +6895,28 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
68866895
isComposerResting && "py-2 sm:py-2",
68876896
)}
68886897
>
6898+
{onStartFrom && !isComposerResting ? (
6899+
<Tooltip>
6900+
<TooltipTrigger
6901+
render={
6902+
<Button
6903+
type="button"
6904+
variant="ghost"
6905+
size="icon-sm"
6906+
className="absolute end-2 top-2 z-10 sm:end-2.5 sm:top-2.5"
6907+
aria-label="Start from a pull request, branch, issue, or automation"
6908+
onClick={onStartFrom}
6909+
/>
6910+
}
6911+
>
6912+
<EllipsisIcon />
6913+
</TooltipTrigger>
6914+
<TooltipPopup>
6915+
Start from a PR, branch, issue, or automation
6916+
{startFromShortcutLabel ? ` (${startFromShortcutLabel})` : null}
6917+
</TooltipPopup>
6918+
</Tooltip>
6919+
) : null}
68896920
{isStashMenuOpen && !composerMenuOpen && (
68906921
<ComposerCommandMenuLayer anchor={composerMenuAnchor}>
68916922
<ComposerStashMenu
@@ -7029,7 +7060,10 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
70297060
buildContextClipboardFragment={buildContextClipboardFragmentStable}
70307061
importContextFragment={importContextFragmentStable}
70317062
skills={selectedProviderSkills}
7032-
containerClassName={cn(isComposerResting && "min-w-0 flex-1")}
7063+
containerClassName={cn(
7064+
isComposerResting && "min-w-0 flex-1",
7065+
onStartFrom && !isComposerResting && "pe-7",
7066+
)}
70337067
className={cn(
70347068
showMobilePendingAnswerActions && "max-sm:pb-12",
70357069
isComposerResting &&

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.