35 // Now it's time to delete the creation
36 const rows = await sqlite.execute(
37 `CREATE TABLE deleted AS SELECT id, image FROM ${TABLE_NAME} WHERE id = ?;
38 DELETE FROM ${TABLE_NAME} WHERE id IN (SELECT id FROM deleted WHERE id = ?);
39 SELECT image FROM deleted WHERE id = ?;
40 DROP TABLE deleted;`,
41 [id, id, id],
42 );
43
44 if (rows[0] && rows[0].image) {
45 // Also delete the blob!
46 blob.delete("pondiverse_image" + id);
47 }
48
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
4
5
6
7## Install
16- Generate ideas and outlines
17- Improve writing style and grammar
18- Create complementary images
19- Optimize content for search engines
20
23## Interactive and Immersive Content
24
25Static text and images are giving way to more interactive experiences:
26
27- Embedded interactive data visualizations
48```
49
50### Images
51
52```
53
54```
55
67- Implement categories in addition to tags
68- Add search functionality
69- Support for images in blog posts
70- RSS feed generation
57```
58
59## Images
60
61```markdown
62
63
64```
65
9 bearerToken: string;
10 selectedFiles: string[];
11 images: (string | null)[];
12 soundEnabled: boolean;
13}
19 bearerToken,
20 selectedFiles,
21 images,
22 soundEnabled,
23}: UseChatLogicProps) {
43 anthropicApiKey,
44 selectedFiles,
45 images: images
46 .filter((img): img is string => {
47 const isValid = typeof img === "string" && img.startsWith("data:");
48 if (!isValid && img !== null) {
49 console.warn("Invalid image format:", img?.substring(0, 50) + "...");
50 }
51 return isValid;
29 - [x] File write as a code embed
30 - [x] str_replace as a diff view
31- [x] make image drop area invisible and bigger
32- [x] Give it all the code (except maybe .txt files) as initial context (like cursor sonnet max)
33- [x] I seem to have lost the delete file tool and instructions, try to find them back in history or re-create?
55- [x] Create branch
56- [x] URL input + pathname
57- [x] Image upload controls
58- [x] Preview refresh button
59- [x] Audio controls
172
173- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
174- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
175- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
176- **Storage:** DO NOT use the Deno KV module for storage
177- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods
682 background-color: var(--highlight);
683}
684.card-image {
685 display: flex;
686 align-items: center;
704}
705
706.image-placeholder,
707.image-thumbnail {
708 width: 40px;
709 height: 40px;
711 object-fit: cover;
712}
713.image-placeholder {
714 background-color: var(--muted);
715}
722}
723
724.image-row {
725 display: flex;
726 gap: var(--space-1);
727}
728.input-image {
729 position: relative;
730 border: 1px solid var(--muted);
731 border-radius: 6px;
732}
733.remove-image-button {
734 position: absolute;
735 top: 0;
744 opacity: 0;
745}
746.input-image:hover .remove-image-button {
747 opacity: 1;
748}
749
750.image-drop-overlay {
751 position: fixed;
752 top: 0;
761 justify-content: center;
762}
763.image-drop-inner {
764 padding: var(--space-2);
765 background-color: var(--background);
766}
767
768.transition, .input-box, .icon-button, .button, .remove-image-button {
769 transition-property: color, background-color, border-color, opacity;
770 transition-duration: 200ms;