Skip to content

Code Generation Tool#718

Open
bobur-khay wants to merge 27 commits into
eclipse-thingweb:masterfrom
bobur-khay:feature/code-gen
Open

Code Generation Tool#718
bobur-khay wants to merge 27 commits into
eclipse-thingweb:masterfrom
bobur-khay:feature/code-gen

Conversation

@bobur-khay
Copy link
Copy Markdown
Contributor

@bobur-khay bobur-khay commented May 23, 2026

This is a take over of PR: eclipse-thingweb/td-tools#61

The goal is to create a package of a code generation tool that creates a protocol specific code snippet in a chosen library of a programming language and integrate it to the playground.

Taking over the previous PR I could not make it run and had a different vision of the use of AI generation:

  • The Bring Your Own Token principal requires the playground of either:

    1. Stroring the token in the local storage which causes security concerns (e.g. XSS)
    2. Making the user pasting their token every time they use the playground which makes them generate new tokens every time or keeping them somewhere

    In both cases the user needs a developer account in their respective LLM provider and has to know how to generate the token which reduces UX imo. Therefore, after discussing this with @egekorkan I implemented another concept where the tool generates a prompt that user can paste in an LLM of their own choice:

    • We do not handle the user tokens
    • The user is not limited in the number of LLM providers that are supported by the tool
    • Reduces the complexity of the package

The tool is inside of this repository for now for testing purposes. Later it can be moved to the td-tools repository.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 23, 2026

Deploy Preview for thingweb-playground ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit be40612
🔍 Latest deploy log https://app.netlify.com/projects/thingweb-playground/deploys/6a16f0ebe939f10007fcc9a1
😎 Deploy Preview https://deploy-preview-718--thingweb-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 23 (🔴 down 4 from production)
Accessibility: 79 (no change from production)
Best Practices: 100 (no change from production)
SEO: 80 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@bobur-khay bobur-khay marked this pull request as ready for review May 25, 2026 09:16
Copy link
Copy Markdown
Member

@egekorkan egekorkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review based on git diff

  • Netlify previews are failing due to dependencies. Not sure how the CI tests are passing if the problem is so basic :D
  • For the tests, did you also do tests with a live Thing? like your coffee machine example or http://plugfest.thingweb.io/http-data-schema-thing ?

Comment thread packages/code-gen/README.md
Comment thread packages/code-gen/i.json Outdated
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