@mobileai/react-native 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -6
- package/lib/module/components/AIAgent.js +40 -4
- package/lib/module/components/AIAgent.js.map +1 -1
- package/lib/module/components/AgentChatBar.js +177 -29
- package/lib/module/components/AgentChatBar.js.map +1 -1
- package/lib/module/core/AgentRuntime.js +268 -126
- package/lib/module/core/AgentRuntime.js.map +1 -1
- package/lib/module/core/FiberTreeWalker.js +74 -20
- package/lib/module/core/FiberTreeWalker.js.map +1 -1
- package/lib/module/core/systemPrompt.js +164 -0
- package/lib/module/core/systemPrompt.js.map +1 -0
- package/lib/module/providers/GeminiProvider.js +189 -73
- package/lib/module/providers/GeminiProvider.js.map +1 -1
- package/lib/typescript/src/components/AIAgent.d.ts +9 -1
- package/lib/typescript/src/components/AIAgent.d.ts.map +1 -1
- package/lib/typescript/src/components/AgentChatBar.d.ts +4 -3
- package/lib/typescript/src/components/AgentChatBar.d.ts.map +1 -1
- package/lib/typescript/src/core/AgentRuntime.d.ts +16 -0
- package/lib/typescript/src/core/AgentRuntime.d.ts.map +1 -1
- package/lib/typescript/src/core/FiberTreeWalker.d.ts +5 -0
- package/lib/typescript/src/core/FiberTreeWalker.d.ts.map +1 -1
- package/lib/typescript/src/core/systemPrompt.d.ts +9 -0
- package/lib/typescript/src/core/systemPrompt.d.ts.map +1 -0
- package/lib/typescript/src/core/types.d.ts +51 -13
- package/lib/typescript/src/core/types.d.ts.map +1 -1
- package/lib/typescript/src/providers/GeminiProvider.d.ts +33 -13
- package/lib/typescript/src/providers/GeminiProvider.d.ts.map +1 -1
- package/package.json +16 -14
- package/src/components/AIAgent.tsx +41 -1
- package/src/components/AgentChatBar.tsx +150 -28
- package/src/core/AgentRuntime.ts +287 -131
- package/src/core/FiberTreeWalker.ts +74 -19
- package/src/core/systemPrompt.ts +162 -0
- package/src/core/types.ts +58 -10
- package/src/providers/GeminiProvider.ts +174 -101
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# @mobileai/react-native
|
|
2
2
|
|
|
3
|
+
Also available as **`react-native-agentic-ai`** — same package, same code.
|
|
4
|
+
|
|
3
5
|
> **Autonomous AI agent for React Native** — Your app gets an AI copilot that can see, understand, and interact with your UI. Zero wrappers, zero view rewriting.
|
|
4
6
|
|
|
5
|
-
[](https://www.npmjs.com/package/@mobileai/react-native)
|
|
6
|
-
[](https://www.npmjs.com/package/@mobileai/react-native)
|
|
8
|
+
[](https://www.npmjs.com/package/react-native-agentic-ai)
|
|
9
|
+
[](https://github.com/mohamed2m2018/mobileai-react-native/blob/main/LICENSE)
|
|
7
10
|
[]()
|
|
8
11
|
|
|
9
12
|
Wrap your navigation with `<AIAgent>`. The AI automatically understands your entire screen — every button, every input, every label — and acts on it.
|
|
@@ -19,8 +22,14 @@ Wrap your navigation with `<AIAgent>`. The AI automatically understands your ent
|
|
|
19
22
|
|
|
20
23
|
## 📦 Installation
|
|
21
24
|
|
|
25
|
+
Pick whichever name you prefer — both packages are identical:
|
|
26
|
+
|
|
22
27
|
```bash
|
|
28
|
+
# Scoped name
|
|
23
29
|
npm install @mobileai/react-native
|
|
30
|
+
|
|
31
|
+
# Or the unscoped alias
|
|
32
|
+
npm install react-native-agentic-ai
|
|
24
33
|
```
|
|
25
34
|
|
|
26
35
|
No native modules required. Works with Expo managed workflow out of the box — **no eject needed**.
|
|
@@ -29,6 +38,7 @@ No native modules required. Works with Expo managed workflow out of the box —
|
|
|
29
38
|
|
|
30
39
|
```tsx
|
|
31
40
|
import { AIAgent } from '@mobileai/react-native';
|
|
41
|
+
// or: import { AIAgent } from 'react-native-agentic-ai';
|
|
32
42
|
import { NavigationContainer, useNavigationContainerRef } from '@react-navigation/native';
|
|
33
43
|
|
|
34
44
|
export default function App() {
|
|
@@ -68,6 +78,7 @@ Register a **non-UI action** the AI can call — for business logic that isn't a
|
|
|
68
78
|
|
|
69
79
|
```tsx
|
|
70
80
|
import { useAction } from '@mobileai/react-native';
|
|
81
|
+
// or: import { useAction } from 'react-native-agentic-ai';
|
|
71
82
|
|
|
72
83
|
function CartScreen() {
|
|
73
84
|
const { clearCart, getTotal } = useCart();
|
|
@@ -159,15 +170,76 @@ useAction('checkout', 'Place the order', {}, () => {
|
|
|
159
170
|
| `onBeforeTask` | Called before task execution starts. |
|
|
160
171
|
| `onAfterTask` | Called after task completes. |
|
|
161
172
|
|
|
162
|
-
## 🌐 MCP Bridge
|
|
173
|
+
## 🌐 MCP Bridge (Control Your App from Desktop AI)
|
|
174
|
+
|
|
175
|
+
The MCP (Model Context Protocol) bridge lets **external AI agents** — like Claude Desktop, OpenClaw, or any MCP-compatible client — remotely control your React Native app through natural language.
|
|
176
|
+
|
|
177
|
+
### Architecture
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
┌──────────────────┐ SSE/HTTP ┌──────────────────┐ WebSocket ┌──────────────────┐
|
|
181
|
+
│ Claude Desktop │ ◄──────────────► │ MCP Server │ ◄─────────────► │ Your React │
|
|
182
|
+
│ or any MCP │ (port 3100) │ (Node.js) │ (port 3101) │ Native App │
|
|
183
|
+
│ compatible AI │ │ │ │ │
|
|
184
|
+
└──────────────────┘ └──────────────────┘ └──────────────────┘
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### How It Works
|
|
188
|
+
|
|
189
|
+
1. The **MCP server** (included in `mcp-server/`) runs on your machine as a Node.js process
|
|
190
|
+
2. Your **React Native app** connects to the server via WebSocket (`ws://localhost:3101`)
|
|
191
|
+
3. An **external AI** (e.g., Claude Desktop) connects to the MCP server via SSE (`http://localhost:3100/mcp/sse`)
|
|
192
|
+
4. When Claude sends a command like *"Order 2 lemonades"*, the MCP server forwards it to your app
|
|
193
|
+
5. Your app's `AgentRuntime` executes the task autonomously and sends back the result
|
|
194
|
+
|
|
195
|
+
### Setup
|
|
196
|
+
|
|
197
|
+
**1. Start the MCP server:**
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
cd mcp-server
|
|
201
|
+
npm install
|
|
202
|
+
npm start
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
This starts two servers:
|
|
206
|
+
- **HTTP/SSE** on `http://localhost:3100` — for AI clients (Claude, OpenClaw)
|
|
207
|
+
- **WebSocket** on `ws://localhost:3101` — for your React Native app
|
|
163
208
|
|
|
164
|
-
Connect
|
|
209
|
+
**2. Connect your app:**
|
|
165
210
|
|
|
166
211
|
```tsx
|
|
167
|
-
<AIAgent
|
|
212
|
+
<AIAgent
|
|
213
|
+
apiKey="YOUR_GEMINI_KEY"
|
|
214
|
+
mcpServerUrl="ws://localhost:3101"
|
|
215
|
+
/>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**3. Connect Claude Desktop** — add this to your Claude config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"mcpServers": {
|
|
223
|
+
"mobile-app": {
|
|
224
|
+
"url": "http://localhost:3100/mcp/sse"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
168
228
|
```
|
|
169
229
|
|
|
170
|
-
|
|
230
|
+
### Available MCP Tools
|
|
231
|
+
|
|
232
|
+
| Tool | Description |
|
|
233
|
+
|------|-------------|
|
|
234
|
+
| `execute_task(command)` | Send a natural language task to the app (e.g., *"Add a burger to cart"*) |
|
|
235
|
+
| `get_app_status()` | Check if the React Native app is currently connected |
|
|
236
|
+
|
|
237
|
+
### Environment Variables
|
|
238
|
+
|
|
239
|
+
| Variable | Default | Description |
|
|
240
|
+
|----------|---------|-------------|
|
|
241
|
+
| `MCP_PORT` | `3100` | HTTP/SSE port for AI clients |
|
|
242
|
+
| `WS_PORT` | `3101` | WebSocket port for the React Native app |
|
|
171
243
|
|
|
172
244
|
## 🛠️ Built-in Tools
|
|
173
245
|
|
|
@@ -46,13 +46,18 @@ export function AIAgent({
|
|
|
46
46
|
customTools,
|
|
47
47
|
instructions,
|
|
48
48
|
stepDelay,
|
|
49
|
-
mcpServerUrl
|
|
49
|
+
mcpServerUrl,
|
|
50
|
+
router,
|
|
51
|
+
pathname
|
|
50
52
|
}) {
|
|
51
53
|
const rootViewRef = useRef(null);
|
|
52
54
|
const [isThinking, setIsThinking] = useState(false);
|
|
53
55
|
const [statusText, setStatusText] = useState('');
|
|
54
56
|
const [lastResult, setLastResult] = useState(null);
|
|
55
57
|
|
|
58
|
+
// Ref-based resolver for ask_user — stays alive across renders
|
|
59
|
+
const askUserResolverRef = useRef(null);
|
|
60
|
+
|
|
56
61
|
// ─── Create Runtime ──────────────────────────────────────────
|
|
57
62
|
|
|
58
63
|
const config = useMemo(() => ({
|
|
@@ -70,8 +75,25 @@ export function AIAgent({
|
|
|
70
75
|
customTools,
|
|
71
76
|
instructions,
|
|
72
77
|
stepDelay,
|
|
73
|
-
mcpServerUrl
|
|
74
|
-
|
|
78
|
+
mcpServerUrl,
|
|
79
|
+
router,
|
|
80
|
+
pathname,
|
|
81
|
+
onStatusUpdate: setStatusText,
|
|
82
|
+
// Page-agent pattern: block the agent loop until user responds
|
|
83
|
+
onAskUser: question => {
|
|
84
|
+
return new Promise(resolve => {
|
|
85
|
+
askUserResolverRef.current = resolve;
|
|
86
|
+
// Show question in chat bar, allow user input
|
|
87
|
+
setLastResult({
|
|
88
|
+
success: true,
|
|
89
|
+
message: `❓ ${question}`,
|
|
90
|
+
steps: []
|
|
91
|
+
});
|
|
92
|
+
setIsThinking(false);
|
|
93
|
+
setStatusText('');
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}), [apiKey, model, language, maxSteps, interactiveBlacklist, interactiveWhitelist, onBeforeStep, onAfterStep, onBeforeTask, onAfterTask, transformScreenContent, customTools, instructions, stepDelay, mcpServerUrl, router, pathname]);
|
|
75
97
|
const provider = useMemo(() => new GeminiProvider(apiKey, model), [apiKey, model]);
|
|
76
98
|
const runtime = useMemo(() => new AgentRuntime(provider, config, rootViewRef.current, navRef),
|
|
77
99
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -98,6 +120,19 @@ export function AIAgent({
|
|
|
98
120
|
const handleSend = useCallback(async message => {
|
|
99
121
|
if (!message.trim()) return;
|
|
100
122
|
logger.info('AIAgent', `User message: "${message}"`);
|
|
123
|
+
|
|
124
|
+
// If there's a pending ask_user, resolve it instead of starting a new execution
|
|
125
|
+
if (askUserResolverRef.current) {
|
|
126
|
+
const resolver = askUserResolverRef.current;
|
|
127
|
+
askUserResolverRef.current = null;
|
|
128
|
+
setIsThinking(true);
|
|
129
|
+
setStatusText('Processing your answer...');
|
|
130
|
+
setLastResult(null);
|
|
131
|
+
resolver(message);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Normal execution — new task
|
|
101
136
|
setIsThinking(true);
|
|
102
137
|
setStatusText('Thinking...');
|
|
103
138
|
setLastResult(null);
|
|
@@ -137,7 +172,8 @@ export function AIAgent({
|
|
|
137
172
|
onSend: handleSend,
|
|
138
173
|
isThinking: isThinking,
|
|
139
174
|
lastResult: lastResult,
|
|
140
|
-
language: language
|
|
175
|
+
language: language,
|
|
176
|
+
onDismiss: () => setLastResult(null)
|
|
141
177
|
})]
|
|
142
178
|
});
|
|
143
179
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useMemo","useRef","useState","View","StyleSheet","AgentRuntime","GeminiProvider","AgentContext","AgentChatBar","AgentOverlay","logger","MCPBridge","jsx","_jsx","jsxs","_jsxs","AIAgent","apiKey","model","navRef","language","maxSteps","showChatBar","children","onResult","interactiveBlacklist","interactiveWhitelist","onBeforeStep","onAfterStep","onBeforeTask","onAfterTask","transformScreenContent","customTools","instructions","stepDelay","mcpServerUrl","rootViewRef","isThinking","setIsThinking","statusText","setStatusText","lastResult","setLastResult","config","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useRef","useState","View","StyleSheet","AgentRuntime","GeminiProvider","AgentContext","AgentChatBar","AgentOverlay","logger","MCPBridge","jsx","_jsx","jsxs","_jsxs","AIAgent","apiKey","model","navRef","language","maxSteps","showChatBar","children","onResult","interactiveBlacklist","interactiveWhitelist","onBeforeStep","onAfterStep","onBeforeTask","onAfterTask","transformScreenContent","customTools","instructions","stepDelay","mcpServerUrl","router","pathname","rootViewRef","isThinking","setIsThinking","statusText","setStatusText","lastResult","setLastResult","askUserResolverRef","config","onStatusUpdate","onAskUser","question","Promise","resolve","current","success","message","steps","provider","runtime","updateRefs","info","bridge","destroy","handleSend","trim","resolver","result","execute","error","Provider","value","ref","style","styles","root","collapsable","visible","onSend","onDismiss","create","flex"],"sourceRoot":"../../../src","sources":["components/AIAgent.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,MAAM,QAAQ,oBAAiB;AACxC,SAASC,SAAS,QAAQ,sBAAmB;;AAG7C;;AAGA;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAyDA;;AAEA,OAAO,SAASC,OAAOA,CAAC;EACtBC,MAAM;EACNC,KAAK,GAAG,kBAAkB;EAC1BC,MAAM;EACNC,QAAQ,GAAG,IAAI;EACfC,QAAQ,GAAG,EAAE;EACbC,WAAW,GAAG,IAAI;EAClBC,QAAQ;EACRC,QAAQ;EACR;EACAC,oBAAoB;EACpBC,oBAAoB;EACpBC,YAAY;EACZC,WAAW;EACXC,YAAY;EACZC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AAEC,MAAM,CAACC,IAAK;MAACC,WAAW,EAAE,KAAM;MAAAnD,QAAA,EAC5DA;IAAQ,CACL,CAAC,eAGPV,IAAA,CAACJ,YAAY;MAACkE,OAAO,EAAEpC,UAAW;MAACE,UAAU,EAAEA;IAAW,CAAE,CAAC,EAG5DnB,WAAW,iBACVT,IAAA,CAACL,YAAY;MACXoE,MAAM,EAAEd,UAAW;MACnBvB,UAAU,EAAEA,UAAW;MACvBI,UAAU,EAAEA,UAAW;MACvBvB,QAAQ,EAAEA,QAAS;MACnByD,SAAS,EAAEA,CAAA,KAAMjC,aAAa,CAAC,IAAI;IAAE,CACtC,CACF;EAAA,CACoB,CAAC;AAE5B;AAEA,MAAM4B,MAAM,GAAGpE,UAAU,CAAC0E,MAAM,CAAC;EAC/BL,IAAI,EAAE;IACJM,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,41 +1,121 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* AgentChatBar — Floating
|
|
5
|
-
*
|
|
4
|
+
* AgentChatBar — Floating, draggable, compressible chat widget.
|
|
5
|
+
* Does not block underlying UI natively.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { useState } from 'react';
|
|
9
|
-
import { View, TextInput, Pressable, Text, StyleSheet,
|
|
8
|
+
import { useState, useRef } from 'react';
|
|
9
|
+
import { View, TextInput, Pressable, Text, StyleSheet, Animated, PanResponder, useWindowDimensions } from 'react-native';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
export function AgentChatBar({
|
|
12
12
|
onSend,
|
|
13
13
|
isThinking,
|
|
14
14
|
lastResult,
|
|
15
|
-
language
|
|
15
|
+
language,
|
|
16
|
+
onDismiss
|
|
16
17
|
}) {
|
|
17
18
|
const [text, setText] = useState('');
|
|
19
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
20
|
+
const {
|
|
21
|
+
height
|
|
22
|
+
} = useWindowDimensions();
|
|
18
23
|
const isArabic = language === 'ar';
|
|
24
|
+
|
|
25
|
+
// Initial position: Bottom right for FAB, Bottom center for Expanded
|
|
26
|
+
// For simplicity, we just initialize to a safe generic spot on screen.
|
|
27
|
+
const pan = useRef(new Animated.ValueXY({
|
|
28
|
+
x: 10,
|
|
29
|
+
y: height - 200
|
|
30
|
+
})).current;
|
|
31
|
+
|
|
32
|
+
// PanResponder for dragging the widget
|
|
33
|
+
const panResponder = useRef(PanResponder.create({
|
|
34
|
+
onMoveShouldSetPanResponder: (_, gestureState) => {
|
|
35
|
+
// Only trigger drag if moving more than 5px (allows taps to register inside)
|
|
36
|
+
return Math.abs(gestureState.dx) > 5 || Math.abs(gestureState.dy) > 5;
|
|
37
|
+
},
|
|
38
|
+
onPanResponderGrant: () => {
|
|
39
|
+
pan.setOffset({
|
|
40
|
+
x: pan.x._value,
|
|
41
|
+
y: pan.y._value
|
|
42
|
+
});
|
|
43
|
+
pan.setValue({
|
|
44
|
+
x: 0,
|
|
45
|
+
y: 0
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
onPanResponderMove: Animated.event([null, {
|
|
49
|
+
dx: pan.x,
|
|
50
|
+
dy: pan.y
|
|
51
|
+
}], {
|
|
52
|
+
useNativeDriver: false
|
|
53
|
+
}),
|
|
54
|
+
onPanResponderRelease: () => {
|
|
55
|
+
pan.flattenOffset();
|
|
56
|
+
}
|
|
57
|
+
})).current;
|
|
19
58
|
const handleSend = () => {
|
|
20
59
|
if (text.trim() && !isThinking) {
|
|
21
60
|
onSend(text.trim());
|
|
22
61
|
setText('');
|
|
23
62
|
}
|
|
24
63
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
64
|
+
|
|
65
|
+
// ─── Compressed State (FAB) ───
|
|
66
|
+
if (!isExpanded) {
|
|
67
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
68
|
+
style: [styles.fabContainer, pan.getLayout()],
|
|
69
|
+
...panResponder.panHandlers,
|
|
70
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
71
|
+
style: styles.fab,
|
|
72
|
+
onPress: () => setIsExpanded(true),
|
|
73
|
+
accessibilityLabel: "Open AI Agent Chat",
|
|
74
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
75
|
+
style: styles.fabIcon,
|
|
76
|
+
children: isThinking ? '⏳' : '🤖'
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ─── Expanded State (Widget) ───
|
|
83
|
+
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
84
|
+
style: [styles.expandedContainer, pan.getLayout()],
|
|
85
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
86
|
+
...panResponder.panHandlers,
|
|
87
|
+
style: styles.dragHandleArea,
|
|
88
|
+
accessibilityLabel: "Drag AI Agent",
|
|
89
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
90
|
+
style: styles.dragGrip
|
|
91
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
92
|
+
onPress: () => setIsExpanded(false),
|
|
93
|
+
style: styles.minimizeBtn,
|
|
94
|
+
accessibilityLabel: "Minimize AI Agent",
|
|
95
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
96
|
+
style: styles.minimizeText,
|
|
97
|
+
children: "\u2014"
|
|
98
|
+
})
|
|
99
|
+
})]
|
|
100
|
+
}), lastResult && /*#__PURE__*/_jsxs(View, {
|
|
29
101
|
style: [styles.resultBubble, lastResult.success ? styles.resultSuccess : styles.resultError],
|
|
30
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
102
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
31
103
|
style: styles.resultText,
|
|
32
104
|
children: lastResult.message
|
|
33
|
-
})
|
|
105
|
+
}), onDismiss && /*#__PURE__*/_jsx(Pressable, {
|
|
106
|
+
style: styles.dismissButton,
|
|
107
|
+
onPress: onDismiss,
|
|
108
|
+
hitSlop: 12,
|
|
109
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
110
|
+
style: styles.dismissText,
|
|
111
|
+
children: "\u2715"
|
|
112
|
+
})
|
|
113
|
+
})]
|
|
34
114
|
}), /*#__PURE__*/_jsxs(View, {
|
|
35
115
|
style: styles.inputRow,
|
|
36
116
|
children: [/*#__PURE__*/_jsx(TextInput, {
|
|
37
117
|
style: [styles.input, isArabic && styles.inputRTL],
|
|
38
|
-
placeholder: isArabic ? 'اكتب طلبك...' : 'Ask
|
|
118
|
+
placeholder: isArabic ? 'اكتب طلبك...' : 'Ask AI...',
|
|
39
119
|
placeholderTextColor: "#999",
|
|
40
120
|
value: text,
|
|
41
121
|
onChangeText: setText,
|
|
@@ -47,6 +127,7 @@ export function AgentChatBar({
|
|
|
47
127
|
style: [styles.sendButton, isThinking && styles.sendButtonDisabled],
|
|
48
128
|
onPress: handleSend,
|
|
49
129
|
disabled: isThinking || !text.trim(),
|
|
130
|
+
accessibilityLabel: "Send request to AI Agent",
|
|
50
131
|
children: /*#__PURE__*/_jsx(Text, {
|
|
51
132
|
style: styles.sendButtonText,
|
|
52
133
|
children: isThinking ? '⏳' : '🚀'
|
|
@@ -56,22 +137,79 @@ export function AgentChatBar({
|
|
|
56
137
|
});
|
|
57
138
|
}
|
|
58
139
|
const styles = StyleSheet.create({
|
|
59
|
-
|
|
140
|
+
// FAB Styles
|
|
141
|
+
fabContainer: {
|
|
60
142
|
position: 'absolute',
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
143
|
+
zIndex: 9999
|
|
144
|
+
},
|
|
145
|
+
fab: {
|
|
146
|
+
width: 60,
|
|
147
|
+
height: 60,
|
|
148
|
+
borderRadius: 30,
|
|
149
|
+
backgroundColor: '#1a1a2e',
|
|
150
|
+
justifyContent: 'center',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
elevation: 5,
|
|
153
|
+
shadowColor: '#000',
|
|
154
|
+
shadowOffset: {
|
|
155
|
+
width: 0,
|
|
156
|
+
height: 4
|
|
157
|
+
},
|
|
158
|
+
shadowOpacity: 0.3,
|
|
159
|
+
shadowRadius: 6
|
|
160
|
+
},
|
|
161
|
+
fabIcon: {
|
|
162
|
+
fontSize: 28
|
|
163
|
+
},
|
|
164
|
+
// Expanded Styles
|
|
165
|
+
expandedContainer: {
|
|
166
|
+
position: 'absolute',
|
|
167
|
+
zIndex: 9999,
|
|
168
|
+
width: 340,
|
|
67
169
|
backgroundColor: 'rgba(26, 26, 46, 0.95)',
|
|
68
|
-
|
|
69
|
-
|
|
170
|
+
borderRadius: 24,
|
|
171
|
+
padding: 16,
|
|
172
|
+
paddingTop: 8,
|
|
173
|
+
elevation: 8,
|
|
174
|
+
shadowColor: '#000',
|
|
175
|
+
shadowOffset: {
|
|
176
|
+
width: 0,
|
|
177
|
+
height: 8
|
|
178
|
+
},
|
|
179
|
+
shadowOpacity: 0.4,
|
|
180
|
+
shadowRadius: 10
|
|
70
181
|
},
|
|
182
|
+
dragHandleArea: {
|
|
183
|
+
width: '100%',
|
|
184
|
+
height: 30,
|
|
185
|
+
justifyContent: 'center',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
marginBottom: 8
|
|
188
|
+
},
|
|
189
|
+
dragGrip: {
|
|
190
|
+
width: 40,
|
|
191
|
+
height: 5,
|
|
192
|
+
backgroundColor: 'rgba(255, 255, 255, 0.3)',
|
|
193
|
+
borderRadius: 4
|
|
194
|
+
},
|
|
195
|
+
minimizeBtn: {
|
|
196
|
+
position: 'absolute',
|
|
197
|
+
right: 0,
|
|
198
|
+
top: 0,
|
|
199
|
+
padding: 8
|
|
200
|
+
},
|
|
201
|
+
minimizeText: {
|
|
202
|
+
color: '#fff',
|
|
203
|
+
fontSize: 18,
|
|
204
|
+
fontWeight: 'bold'
|
|
205
|
+
},
|
|
206
|
+
// Results & Input
|
|
71
207
|
resultBubble: {
|
|
72
208
|
borderRadius: 12,
|
|
73
209
|
padding: 12,
|
|
74
|
-
marginBottom:
|
|
210
|
+
marginBottom: 12,
|
|
211
|
+
flexDirection: 'row',
|
|
212
|
+
alignItems: 'flex-start'
|
|
75
213
|
},
|
|
76
214
|
resultSuccess: {
|
|
77
215
|
backgroundColor: 'rgba(40, 167, 69, 0.2)'
|
|
@@ -82,7 +220,17 @@ const styles = StyleSheet.create({
|
|
|
82
220
|
resultText: {
|
|
83
221
|
color: '#fff',
|
|
84
222
|
fontSize: 14,
|
|
85
|
-
lineHeight: 20
|
|
223
|
+
lineHeight: 20,
|
|
224
|
+
flex: 1
|
|
225
|
+
},
|
|
226
|
+
dismissButton: {
|
|
227
|
+
marginLeft: 8,
|
|
228
|
+
padding: 2
|
|
229
|
+
},
|
|
230
|
+
dismissText: {
|
|
231
|
+
color: 'rgba(255, 255, 255, 0.6)',
|
|
232
|
+
fontSize: 14,
|
|
233
|
+
fontWeight: 'bold'
|
|
86
234
|
},
|
|
87
235
|
inputRow: {
|
|
88
236
|
flexDirection: 'row',
|
|
@@ -92,9 +240,9 @@ const styles = StyleSheet.create({
|
|
|
92
240
|
input: {
|
|
93
241
|
flex: 1,
|
|
94
242
|
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
95
|
-
borderRadius:
|
|
243
|
+
borderRadius: 20,
|
|
96
244
|
paddingHorizontal: 16,
|
|
97
|
-
paddingVertical:
|
|
245
|
+
paddingVertical: 10,
|
|
98
246
|
color: '#fff',
|
|
99
247
|
fontSize: 16
|
|
100
248
|
},
|
|
@@ -103,9 +251,9 @@ const styles = StyleSheet.create({
|
|
|
103
251
|
writingDirection: 'rtl'
|
|
104
252
|
},
|
|
105
253
|
sendButton: {
|
|
106
|
-
width:
|
|
107
|
-
height:
|
|
108
|
-
borderRadius:
|
|
254
|
+
width: 40,
|
|
255
|
+
height: 40,
|
|
256
|
+
borderRadius: 20,
|
|
109
257
|
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
110
258
|
justifyContent: 'center',
|
|
111
259
|
alignItems: 'center'
|
|
@@ -114,7 +262,7 @@ const styles = StyleSheet.create({
|
|
|
114
262
|
opacity: 0.5
|
|
115
263
|
},
|
|
116
264
|
sendButtonText: {
|
|
117
|
-
fontSize:
|
|
265
|
+
fontSize: 18
|
|
118
266
|
}
|
|
119
267
|
});
|
|
120
268
|
//# sourceMappingURL=AgentChatBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","View","TextInput","Pressable","Text","StyleSheet","
|
|
1
|
+
{"version":3,"names":["useState","useRef","View","TextInput","Pressable","Text","StyleSheet","Animated","PanResponder","useWindowDimensions","jsx","_jsx","jsxs","_jsxs","AgentChatBar","onSend","isThinking","lastResult","language","onDismiss","text","setText","isExpanded","setIsExpanded","height","isArabic","pan","ValueXY","x","y","current","panResponder","create","onMoveShouldSetPanResponder","_","gestureState","Math","abs","dx","dy","onPanResponderGrant","setOffset","_value","setValue","onPanResponderMove","event","useNativeDriver","onPanResponderRelease","flattenOffset","handleSend","trim","style","styles","fabContainer","getLayout","panHandlers","children","fab","onPress","accessibilityLabel","fabIcon","expandedContainer","dragHandleArea","dragGrip","minimizeBtn","minimizeText","resultBubble","success","resultSuccess","resultError","resultText","message","dismissButton","hitSlop","dismissText","inputRow","input","inputRTL","placeholder","placeholderTextColor","value","onChangeText","onSubmitEditing","returnKeyType","editable","multiline","sendButton","sendButtonDisabled","disabled","sendButtonText","position","zIndex","width","borderRadius","backgroundColor","justifyContent","alignItems","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","fontSize","padding","paddingTop","marginBottom","right","top","color","fontWeight","flexDirection","lineHeight","flex","marginLeft","gap","paddingHorizontal","paddingVertical","textAlign","writingDirection","opacity"],"sourceRoot":"../../../src","sources":["components/AgentChatBar.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,QAAQ,OAAO;AACxC,SACEC,IAAI,EACJC,SAAS,EACT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