Skip to content

feat: AI Integration#176

Merged
ruchamahabal merged 58 commits into
frappe:developfrom
ruchamahabal:ai-gen
Jun 1, 2026
Merged

feat: AI Integration#176
ruchamahabal merged 58 commits into
frappe:developfrom
ruchamahabal:ai-gen

Conversation

@ruchamahabal
Copy link
Copy Markdown
Member

@ruchamahabal ruchamahabal commented May 25, 2026

Goal: ability to generate complete app iteratively - with layouts, data sources, variables, scripts, etc. This is the first part: layout generation:

Page Generation

Claude Sonnet 4.6

claude-item-dashboard-compressed.mp4

Better at using space, but some ugly output: badges spanning full-width, can’t do responsive layouts

Qwen 3.7 Max (Open Source)

qwen-emp-appraisal-feedback-view.mp4

Doesn’t understand how to use the space better, but makes responsive layouts

Modifying a block

Select a block and give the prompt. It’s pretty slow at the moment.

qwen-block-modify.mp4

Base architecture referencing builder: frappe/builder#544, ai-session branch

ruchamahabal and others added 17 commits May 27, 2026 12:30
- since token selection here is also for colors and LLMs return only the color
- similar to Builder

- add AI Session doctype for persistence

- convert single prompt to chat panel

- build context string for the whole session and pass to the llm

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
- instruct to use Style Panel properties and pass everything else to raw styles

- instruct to build responsive layouts (setting tablet styles and mobile styles)
@ruchamahabal ruchamahabal marked this pull request as ready for review June 1, 2026 06:49
@ruchamahabal ruchamahabal merged commit 52be1f3 into frappe:develop Jun 1, 2026
1 check passed
@git-avc
Copy link
Copy Markdown

git-avc commented Jun 1, 2026

Looks awesome! Should work with fw develop branch, right?
Can't make it work ... tried to update, build, migrate , setup requirements ... Openrouter key is there, but got stuck here.
Sure I'm doing something wrong.

image

Should raise an issue?

@git-avc
Copy link
Copy Markdown

git-avc commented Jun 1, 2026

@ruchamahabal Forget this ... some socketio issue on my side! Thanks 😉

@ruchamahabal
Copy link
Copy Markdown
Member Author

@git-avc is it working now?

@git-avc
Copy link
Copy Markdown

git-avc commented Jun 1, 2026

After some fighting .. i found it 😸
context.site_name is missing at get_context() on studio.py

def get_context(context):
	csrf_token = frappe.sessions.get_csrf_token()
	frappe.db.commit()
	context.csrf_token = csrf_token
	context.site_url = get_site_url()
	context.is_developer_mode = cint(frappe.conf.developer_mode)
	context.site_name = frappe.local.site

@ruchamahabal
Copy link
Copy Markdown
Member Author

You are right. I was running studio in dev mode (with a vite dev server) hence it was working for me. Fixed here. Thanks for letting me know 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants