microsoft / microsoft/TypeChat

should we read interface as a text file?

Open
#142 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Question
Dominant language
TypeScript
Stars
8.7k
Forks
414
Avg merge
3h 8m
Merged PRs (30d)
3

Description

looking at the examples:

https://github.com/microsoft/TypeChat/blob/main/examples/calendar/src/main.ts#L11C25-L11C25
https://github.com/microsoft/TypeChat/blob/main/examples/restaurant/src/main.ts#L15

const schema = fs.readFileSync(path.join(__dirname, "calendarActionsSchema.ts"), "utf8");

I find it odd that we read in the typescript schema as a text file.
after the code is transpiled, those .ts files won't exist.

I guess I could manually copy over to the /dist after building but that seems a hack

Is there a method to just import the schema or pass a typescript type?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/calendar/src/main.ts and examples/restaurant/src/main.ts, then inspect how the referenced TypeScript schema files are handled when the examples are transpiled. Determine whether the schema can be imported or represented through a TypeScript type, and consider the work complete when the built examples no longer depend on unavailable source .ts files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.