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:
Bkk1234 committed 2026-10-27 00:55:32 +07:00
1 parent 8e87e47017
commit 92a2adad6a
133 files changed
+23416 -50

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
const mocks = vi.hoisted(() => ({
readAppState: vi.fn(),
}));
vi.mock("@agent-native/core/application-state", () => ({
readAppState: mocks.readAppState,
}));
import action from "./view-screen";
describe("view-screen", () => {
beforeEach(() => {
vi.clearAllMocks();
});
it("returns the current navigation state when present", async () => {
mocks.readAppState.mockResolvedValue({ view: "chat", threadId: "t1" });
const result = await action.run({});
expect(mocks.readAppState).toHaveBeenCalledWith("navigation");
expect(result).toEqual({
navigation: { view: "chat", threadId: "t1" },
});
});
it("returns a fallback message when there is no navigation state", async () => {
mocks.readAppState.mockResolvedValue(null);
const result = await action.run({});
expect(result).toBe("No application state found. Is the app running?");
});
});