refactor: split repo into docs/ mockup/ app/
- move static mockups from resource/ui to mockup/ - move React app scaffold from resource/ui to app/ - move prome.md + images to docs/ - drop empty resource/jsonfile and resource/ - add root .gitignore - rewrite README for new layout - fix paths in mockup/index.html (resource/ui -> mockup, docs/prome.md)
This commit is contained in:
1 parent
8e87e47017
commit
92a2adad6a
133 files changed
+23416
-50
No files matched your search
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* See what the user is currently looking at on screen.
|
||||
*
|
||||
* Reads and returns the current navigation state from application state.
|
||||
*
|
||||
* Usage:
|
||||
* pnpm action view-screen
|
||||
*/
|
||||
|
||||
import { defineAction } from "@agent-native/core/action";
|
||||
import { readAppState } from "@agent-native/core/application-state";
|
||||
import { z } from "zod";
|
||||
|
||||
export default defineAction({
|
||||
description:
|
||||
"See what the user is currently looking at on screen. Returns the current navigation state for the app canvas plus agent rail. Always call this first before taking any action.",
|
||||
schema: z.object({}),
|
||||
http: false,
|
||||
readOnly: true,
|
||||
run: async () => {
|
||||
const navigation = await readAppState("navigation");
|
||||
|
||||
const screen: Record<string, unknown> = {};
|
||||
if (navigation) screen.navigation = navigation;
|
||||
|
||||
if (Object.keys(screen).length === 0) {
|
||||
return "No application state found. Is the app running?";
|
||||
}
|
||||
return screen;
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user