Update files
This commit is contained in:
@@ -33,7 +33,7 @@ export default function AgentsScreen() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<BackHeader title="All Agents" />
|
<BackHeader title="All agents" />
|
||||||
<AgentList
|
<AgentList
|
||||||
agents={sortedAgents}
|
agents={sortedAgents}
|
||||||
isRefreshing={isManualRefresh && isRevalidating}
|
isRefreshing={isManualRefresh && isRevalidating}
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ export default function SettingsScreen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
"Remove Host",
|
"Remove host",
|
||||||
`Remove ${profile.label}?`,
|
`Remove ${profile.label}?`,
|
||||||
[
|
[
|
||||||
{ text: "Cancel", style: "cancel" },
|
{ text: "Cancel", style: "cancel" },
|
||||||
@@ -520,7 +520,7 @@ export default function SettingsScreen() {
|
|||||||
|
|
||||||
function handleReset() {
|
function handleReset() {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
"Reset Settings",
|
"Reset settings",
|
||||||
"Are you sure you want to reset all settings to defaults?",
|
"Are you sure you want to reset all settings to defaults?",
|
||||||
[
|
[
|
||||||
{ text: "Cancel", style: "cancel" },
|
{ text: "Cancel", style: "cancel" },
|
||||||
@@ -531,7 +531,7 @@ export default function SettingsScreen() {
|
|||||||
try {
|
try {
|
||||||
await resetSettings();
|
await resetSettings();
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
"Settings Reset",
|
"Settings reset",
|
||||||
"All settings have been reset to defaults."
|
"All settings have been reset to defaults."
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -596,7 +596,7 @@ export default function SettingsScreen() {
|
|||||||
style={styles.addButton}
|
style={styles.addButton}
|
||||||
onPress={() => setIsAddHostMethodVisible(true)}
|
onPress={() => setIsAddHostMethodVisible(true)}
|
||||||
>
|
>
|
||||||
<Text style={styles.addButtonText}>+ Add Host</Text>
|
<Text style={styles.addButtonText}>+ Add host</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -711,7 +711,7 @@ export default function SettingsScreen() {
|
|||||||
<View style={styles.audioCard}>
|
<View style={styles.audioCard}>
|
||||||
<View style={styles.audioRow}>
|
<View style={styles.audioRow}>
|
||||||
<View style={styles.audioRowContent}>
|
<View style={styles.audioRowContent}>
|
||||||
<Text style={styles.audioRowTitle}>Use Speaker</Text>
|
<Text style={styles.audioRowTitle}>Use speaker</Text>
|
||||||
<Text style={styles.audioRowDescription}>
|
<Text style={styles.audioRowDescription}>
|
||||||
Play audio through speaker instead of earpiece
|
Play audio through speaker instead of earpiece
|
||||||
</Text>
|
</Text>
|
||||||
@@ -726,7 +726,7 @@ export default function SettingsScreen() {
|
|||||||
|
|
||||||
<View style={[styles.audioRow, styles.audioRowBorder]}>
|
<View style={[styles.audioRow, styles.audioRowBorder]}>
|
||||||
<View style={styles.audioRowContent}>
|
<View style={styles.audioRowContent}>
|
||||||
<Text style={styles.audioRowTitle}>Keep Screen On</Text>
|
<Text style={styles.audioRowTitle}>Keep screen on</Text>
|
||||||
<Text style={styles.audioRowDescription}>
|
<Text style={styles.audioRowDescription}>
|
||||||
Prevent screen from sleeping during voice sessions
|
Prevent screen from sleeping during voice sessions
|
||||||
</Text>
|
</Text>
|
||||||
@@ -750,7 +750,7 @@ export default function SettingsScreen() {
|
|||||||
onPress={() => router.push("/audio-test")}
|
onPress={() => router.push("/audio-test")}
|
||||||
>
|
>
|
||||||
<View style={styles.devButtonContent}>
|
<View style={styles.devButtonContent}>
|
||||||
<Text style={styles.devButtonTitle}>Audio Test</Text>
|
<Text style={styles.devButtonTitle}>Audio test</Text>
|
||||||
<Text style={styles.devButtonDescription}>
|
<Text style={styles.devButtonDescription}>
|
||||||
Test audio recording and playback
|
Test audio recording and playback
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function AgentDetailsSheet({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<AdaptiveModalSheet
|
<AdaptiveModalSheet
|
||||||
title="Agent Details"
|
title="Agent details"
|
||||||
visible={visible}
|
visible={visible}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
testID="agent-details-sheet"
|
testID="agent-details-sheet"
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ export function AgentConfigRow({
|
|||||||
<View style={styles.agentConfigColumn}>
|
<View style={styles.agentConfigColumn}>
|
||||||
<ComboSelect
|
<ComboSelect
|
||||||
label="PROVIDER"
|
label="PROVIDER"
|
||||||
title="Select Provider"
|
title="Select provider"
|
||||||
value={selectedProvider}
|
value={selectedProvider}
|
||||||
options={providerOptions}
|
options={providerOptions}
|
||||||
placeholder="Select..."
|
placeholder="Select..."
|
||||||
@@ -717,7 +717,7 @@ export function AgentConfigRow({
|
|||||||
<View style={styles.agentConfigColumn}>
|
<View style={styles.agentConfigColumn}>
|
||||||
<ComboSelect
|
<ComboSelect
|
||||||
label="MODEL"
|
label="MODEL"
|
||||||
title="Select Model"
|
title="Select model"
|
||||||
value={selectedModel}
|
value={selectedModel}
|
||||||
options={modelSelectOptions}
|
options={modelSelectOptions}
|
||||||
placeholder="Auto"
|
placeholder="Auto"
|
||||||
@@ -729,7 +729,7 @@ export function AgentConfigRow({
|
|||||||
<View style={styles.agentConfigColumn}>
|
<View style={styles.agentConfigColumn}>
|
||||||
<ComboSelect
|
<ComboSelect
|
||||||
label="MODE"
|
label="MODE"
|
||||||
title="Select Mode"
|
title="Select mode"
|
||||||
value={effectiveSelectedMode}
|
value={effectiveSelectedMode}
|
||||||
options={modeSelectOptions}
|
options={modeSelectOptions}
|
||||||
placeholder="Default"
|
placeholder="Default"
|
||||||
@@ -775,7 +775,7 @@ export function AssistantDropdown({
|
|||||||
controlRef={anchorRef}
|
controlRef={anchorRef}
|
||||||
/>
|
/>
|
||||||
<AdaptiveSelect
|
<AdaptiveSelect
|
||||||
title="Choose Assistant"
|
title="Choose assistant"
|
||||||
visible={isOpen}
|
visible={isOpen}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
anchorRef={anchorRef}
|
anchorRef={anchorRef}
|
||||||
@@ -1069,7 +1069,7 @@ export function WorkingDirectoryDropdown({
|
|||||||
testID="working-directory-select"
|
testID="working-directory-select"
|
||||||
/>
|
/>
|
||||||
<AdaptiveSelect
|
<AdaptiveSelect
|
||||||
title="Working Directory"
|
title="Working directory"
|
||||||
visible={isOpen}
|
visible={isOpen}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
anchorRef={anchorRef}
|
anchorRef={anchorRef}
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ export function AgentList({
|
|||||||
]}
|
]}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
>
|
>
|
||||||
{agent.title || "New Agent"}
|
{agent.title || "New agent"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ export function FileExplorerPane({
|
|||||||
handleCloseMenu();
|
handleCloseMenu();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={styles.entryMenuText}>Copy Path</Text>
|
<Text style={styles.entryMenuText}>Copy path</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
{menuEntry.kind === "file" ? (
|
{menuEntry.kind === "file" ? (
|
||||||
<Pressable
|
<Pressable
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ export function GroupedAgentList({
|
|||||||
]}
|
]}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
>
|
>
|
||||||
{agent.title || "New Agent"}
|
{agent.title || "New agent"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ export function HomeFooter() {
|
|||||||
style={iconStyle}
|
style={iconStyle}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.footerButtonText}>New Agent</Text>
|
<Text style={styles.footerButtonText}>New agent</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|
||||||
<Pressable
|
<Pressable
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import {
|
|||||||
import type { ReactNode, ComponentType } from "react";
|
import type { ReactNode, ComponentType } from "react";
|
||||||
import type { AgentProvider } from "@server/server/agent/agent-sdk-types";
|
import type { AgentProvider } from "@server/server/agent/agent-sdk-types";
|
||||||
import { getAgentProviderDefinition } from "@server/server/agent/provider-manifest";
|
import { getAgentProviderDefinition } from "@server/server/agent/provider-manifest";
|
||||||
import Markdown from "react-native-markdown-display";
|
import Markdown, { MarkdownIt } from "react-native-markdown-display";
|
||||||
|
import * as Linking from "expo-linking";
|
||||||
import {
|
import {
|
||||||
Circle,
|
Circle,
|
||||||
Info,
|
Info,
|
||||||
@@ -506,6 +507,16 @@ export const AssistantMessage = memo(function AssistantMessage({
|
|||||||
|
|
||||||
const markdownStyles = useMemo(() => createMarkdownStyles(theme), [theme]);
|
const markdownStyles = useMemo(() => createMarkdownStyles(theme), [theme]);
|
||||||
|
|
||||||
|
const markdownParser = useMemo(
|
||||||
|
() => MarkdownIt({ typographer: true, linkify: true }),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleLinkPress = useCallback((url: string) => {
|
||||||
|
void Linking.openURL(url);
|
||||||
|
return true;
|
||||||
|
}, []);
|
||||||
|
|
||||||
const markdownRules = useMemo(() => {
|
const markdownRules = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
text: (
|
text: (
|
||||||
@@ -657,7 +668,12 @@ export const AssistantMessage = memo(function AssistantMessage({
|
|||||||
assistantMessageStylesheet.containerSpacing,
|
assistantMessageStylesheet.containerSpacing,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Markdown style={markdownStyles} rules={markdownRules}>
|
<Markdown
|
||||||
|
style={markdownStyles}
|
||||||
|
rules={markdownRules}
|
||||||
|
markdownit={markdownParser}
|
||||||
|
onLinkPress={handleLinkPress}
|
||||||
|
>
|
||||||
{message}
|
{message}
|
||||||
</Markdown>
|
</Markdown>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -201,15 +201,16 @@ export function SlidingSidebar({ selectedAgentId }: SlidingSidebarProps) {
|
|||||||
{/* Header */}
|
{/* Header */}
|
||||||
<View style={styles.sidebarHeader}>
|
<View style={styles.sidebarHeader}>
|
||||||
<Pressable
|
<Pressable
|
||||||
style={({ hovered }) => [
|
style={styles.newAgentButton}
|
||||||
styles.newAgentButton,
|
|
||||||
hovered && styles.newAgentButtonHovered,
|
|
||||||
]}
|
|
||||||
testID="sidebar-new-agent"
|
testID="sidebar-new-agent"
|
||||||
onPress={handleCreateAgentCleanMobile}
|
onPress={handleCreateAgentCleanMobile}
|
||||||
>
|
>
|
||||||
<Plus size={18} color={theme.colors.foreground} />
|
{({ hovered }) => (
|
||||||
<Text style={styles.newAgentButtonText}>New Agent</Text>
|
<>
|
||||||
|
<Plus size={18} color={hovered ? theme.colors.foreground : theme.colors.foregroundMuted} />
|
||||||
|
<Text style={[styles.newAgentButtonText, hovered && styles.newAgentButtonTextHovered]}>New agent</Text>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -267,15 +268,16 @@ export function SlidingSidebar({ selectedAgentId }: SlidingSidebarProps) {
|
|||||||
{...dragHandlers}
|
{...dragHandlers}
|
||||||
>
|
>
|
||||||
<Pressable
|
<Pressable
|
||||||
style={({ hovered }) => [
|
style={styles.newAgentButton}
|
||||||
styles.newAgentButton,
|
|
||||||
hovered && styles.newAgentButtonHovered,
|
|
||||||
]}
|
|
||||||
testID="sidebar-new-agent"
|
testID="sidebar-new-agent"
|
||||||
onPress={handleCreateAgentCleanDesktop}
|
onPress={handleCreateAgentCleanDesktop}
|
||||||
>
|
>
|
||||||
<Plus size={18} color={theme.colors.foreground} />
|
{({ hovered }) => (
|
||||||
<Text style={styles.newAgentButtonText}>New Agent</Text>
|
<>
|
||||||
|
<Plus size={18} color={hovered ? theme.colors.foreground : theme.colors.foregroundMuted} />
|
||||||
|
<Text style={[styles.newAgentButtonText, hovered && styles.newAgentButtonTextHovered]}>New agent</Text>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -344,28 +346,25 @@ const styles = StyleSheet.create((theme) => ({
|
|||||||
sidebarHeader: {
|
sidebarHeader: {
|
||||||
paddingHorizontal: theme.spacing[4],
|
paddingHorizontal: theme.spacing[4],
|
||||||
paddingTop: theme.spacing[4],
|
paddingTop: theme.spacing[4],
|
||||||
paddingBottom: theme.spacing[2],
|
paddingBottom: theme.spacing[3],
|
||||||
|
borderBottomWidth: 1,
|
||||||
|
borderBottomColor: theme.colors.border,
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
},
|
},
|
||||||
newAgentButton: {
|
newAgentButton: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
|
||||||
gap: theme.spacing[2],
|
gap: theme.spacing[2],
|
||||||
paddingVertical: theme.spacing[3],
|
paddingVertical: theme.spacing[1],
|
||||||
borderRadius: theme.borderRadius.lg,
|
paddingHorizontal: theme.spacing[1],
|
||||||
borderWidth: 1,
|
|
||||||
borderColor: theme.colors.border,
|
|
||||||
transitionProperty: "border-color, background-color",
|
|
||||||
transitionDuration: "150ms",
|
|
||||||
},
|
|
||||||
newAgentButtonHovered: {
|
|
||||||
borderColor: theme.colors.palette.zinc[500],
|
|
||||||
backgroundColor: theme.colors.surface2,
|
|
||||||
},
|
},
|
||||||
|
newAgentButtonHovered: {},
|
||||||
newAgentButtonText: {
|
newAgentButtonText: {
|
||||||
fontSize: theme.fontSize.base,
|
fontSize: theme.fontSize.base,
|
||||||
fontWeight: theme.fontWeight.normal,
|
fontWeight: theme.fontWeight.normal,
|
||||||
|
color: theme.colors.foregroundMuted,
|
||||||
|
},
|
||||||
|
newAgentButtonTextHovered: {
|
||||||
color: theme.colors.foreground,
|
color: theme.colors.foreground,
|
||||||
},
|
},
|
||||||
sidebarFooter: {
|
sidebarFooter: {
|
||||||
|
|||||||
@@ -714,13 +714,13 @@ function AgentScreenContent({
|
|||||||
leading={<GitBranch size={16} color={theme.colors.foreground} />}
|
leading={<GitBranch size={16} color={theme.colors.foreground} />}
|
||||||
onSelect={handleViewChanges}
|
onSelect={handleViewChanges}
|
||||||
>
|
>
|
||||||
View Changes
|
View changes
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
leading={<Folder size={16} color={theme.colors.foreground} />}
|
leading={<Folder size={16} color={theme.colors.foreground} />}
|
||||||
onSelect={handleBrowseFiles}
|
onSelect={handleBrowseFiles}
|
||||||
>
|
>
|
||||||
Browse Files
|
Browse files
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
leading={<RotateCcw size={16} color={theme.colors.foreground} />}
|
leading={<RotateCcw size={16} color={theme.colors.foreground} />}
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ export function DraftAgentScreen({
|
|||||||
model,
|
model,
|
||||||
modeId,
|
modeId,
|
||||||
},
|
},
|
||||||
title: "New Agent",
|
title: "New agent",
|
||||||
cwd,
|
cwd,
|
||||||
model,
|
model,
|
||||||
};
|
};
|
||||||
@@ -788,7 +788,7 @@ export function DraftAgentScreen({
|
|||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.agentPanel}>
|
<View style={styles.agentPanel}>
|
||||||
<MenuHeader
|
<MenuHeader
|
||||||
title="New Agent"
|
title="New agent"
|
||||||
rightContent={
|
rightContent={
|
||||||
<Pressable
|
<Pressable
|
||||||
style={styles.hostBadge}
|
style={styles.hostBadge}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export function LegacyAgentIdScreen({ agentId }: { agentId: string }) {
|
|||||||
This link is missing an agent id. Go back to the Agents screen to pick one.
|
This link is missing an agent id. Go back to the Agents screen to pick one.
|
||||||
</Text>
|
</Text>
|
||||||
<Pressable style={styles.primaryButton} onPress={handleGoDraft}>
|
<Pressable style={styles.primaryButton} onPress={handleGoDraft}>
|
||||||
<Text style={styles.primaryButtonText}>New Agent</Text>
|
<Text style={styles.primaryButtonText}>New agent</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@@ -96,7 +96,7 @@ export function LegacyAgentIdScreen({ agentId }: { agentId: string }) {
|
|||||||
again from the Agents screen after it comes back online.
|
again from the Agents screen after it comes back online.
|
||||||
</Text>
|
</Text>
|
||||||
<Pressable style={styles.primaryButton} onPress={handleGoDraft}>
|
<Pressable style={styles.primaryButton} onPress={handleGoDraft}>
|
||||||
<Text style={styles.primaryButtonText}>New Agent</Text>
|
<Text style={styles.primaryButtonText}>New agent</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user