Skip to content

Comments

fix example code#1685

Merged
samchon merged 1 commit intomasterfrom
fix/example
Nov 7, 2025
Merged

fix example code#1685
samchon merged 1 commit intomasterfrom
fix/example

Conversation

@samchon
Copy link
Owner

@samchon samchon commented Nov 7, 2025

This pull request introduces several improvements to the handling of file paths and dependency management in the codebase. The main changes focus on refining the way the project root directory is determined, ensuring consistent path resolution, and updating the usage of a schema generation function.

Path handling and root directory resolution:

  • Updated the calculation of the project root directory in getLocalSourceFile.ts by adjusting the starting point of cwd from __dirname/.. to __dirname/../.., ensuring more accurate traversal to the true project root.
  • Changed the return value of the root directory singleton to use path.resolve(cwd), guaranteeing that the returned path is always absolute and normalized.
  • Added an import for the Node.js path module to support the new path resolution logic.

Schema function usage:

  • Updated the call to typia.llm.schema<IDepartment, "gemini">() by passing an empty object as an argument, likely to align with updated API requirements or to ensure explicit configuration.

@samchon samchon requested a review from Copilot November 7, 2025 15:41
@samchon samchon self-assigned this Nov 7, 2025
@samchon samchon added bug Something isn't working documentation Improvements or additions to documentation labels Nov 7, 2025
@samchon samchon merged commit 4c58f37 into master Nov 7, 2025
5 checks passed
@samchon samchon deleted the fix/example branch November 7, 2025 15:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR contains two bug fixes: correcting the root directory path resolution in the website component and fixing the API usage for LLM schema generation with the Gemini model.

  • Fixed incorrect starting directory level in getLocalSourceFile path resolution logic
  • Normalized the resolved path using path.resolve() for consistency
  • Corrected typia.llm.schema API call to include required $defs parameter for Gemini model

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
website/src/components/internal/getLocalSourceFile.ts Fixed root directory resolution by starting one level higher and using path.resolve() to normalize the final path
examples/src/llm/schema-recursive-gemini.ts Corrected API usage by adding empty $defs parameter to typia.llm.schema call for Gemini model

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

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant