Files
puter/src/puter-js
Tanveer Brar 3cdbcd83b3 feat: GUI Permission Dialog (#1177)
* Added requestPermission endpoint in SDK, updated IPC handler HeyPuter/puter#1150

* - Updated UIWindowRequestPermission.js to accept multiple permission types
- Updated dialog message for permission window in UIWindowRequestPermission.js
- Updated parameters for call to UIWindowRequestPermission in IPC.js
- Added search_uid.js endpoint to allow GUI searches for fsentry by file UUID HeyPuter#1150

* Updated body and header for Permission Request Dialog HeyPuter#1150
- Replace app uid with app name for header in UIWindowRequestPermission.js
- Added path for file permission request body in UIWindowRequestPermission.js
- Removed previously added search_uid.js api implementation previously as it is replaced by simpler call in gui

* Updated permission description generation in UIWindowRequestPermission.js HeyPuter#1150

* Removed incorrect web handling in IPC.js HeyPuter#1150

* Formatting fixes
2025-03-14 19:37:28 -04:00
..
2024-10-17 01:19:06 -04:00
2025-03-14 19:37:28 -04:00
2025-01-19 22:27:31 -08:00
2025-01-19 22:27:31 -08:00

Puter.js

The official JavaScript SDK for Puter.com. Cloud and AI features right from your frontend code!

« LIVE DEMO »

Docs · Puter.com · Discord · Reddit · X (Twitter)

Example

Make sure the development server is running.

<html>
<body>
    <script src="http://puter.localhost:4100/sdk/puter.dev.js"></script>
    <script>
        // Loading ...
        puter.print(`Loading...`);

        // Chat with GPT-3.5 Turbo
        puter.ai.chat(`What color was Napoleon's white horse?`).then((response) => {
            puter.print(response);
        });
    </script>
</body>
</html>