Skip to content

Conversation

@bfollington
Copy link
Contributor

  • Configure CORS in planning server
  • Create gemcraft leptos project
  • Deserialize response to struct

Comment on lines 31 to 37
app.use(
oakCors({
origin: "http://localhost:8080",
optionsSuccessStatus: 200,
methods: "POST, OPTIONS",
})
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-implemented using oak so that we can configure CORS.

Comment on lines 51 to 52
let body = serde_json::to_string(&body).unwrap();
opts.body(Some(&JsValue::from_str(&body)));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugly

Comment on lines 56 to 66
let resp_value = JsFuture::from(win.fetch_with_request(&request))
.await
.expect("failed to fetch");
let resp: Response = resp_value.dyn_into().unwrap();

let json = JsFuture::from(resp.json().unwrap())
.await
.expect("failed to get response text");

let llm_response: LlmResponse =
serde_wasm_bindgen::from_value(json).map_err(|_| "Failed to deserialize JSON")?;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Repeated

@bfollington bfollington force-pushed the feat/2024-07-24-gemcraft-prototype branch from 6640820 to 605cdb4 Compare July 30, 2024 07:21
Your Name (aider) added 16 commits July 31, 2024 12:56
…, explode, and make variations of a gem, plus a "Run" button.
…wn the provided JSON data into subcomponents.
…o generate variations of the provided data gem.
…uest with a reasonable starting point prompt.
@jsantell
Copy link
Collaborator

jsantell commented Mar 5, 2025

Closing out stale PRs, please reopen if this is relevant

@jsantell jsantell closed this Mar 5, 2025
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.

3 participants