-
Notifications
You must be signed in to change notification settings - Fork 0
Toshok's typescript port #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
code-monkey-ts2/agents/agent.ts
Outdated
import { BaseAgent } from "./base_agent"; | ||
|
||
export abstract class Agent extends BaseAgent { | ||
model: ReturnType<typeof createReactAgent>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We always use 2 space-indent for everything where possible.
(I'm not sure why I was not able to get VSCode to use 2 space-indent for python, hence we ended up with 4 spaces there)
…om event data while reading the stream
…reuse until we have better separation of conversation history (or maybe disable the checkpointer altogether?)
…nd Coder on gpt4-o-mini). individual agent MSNs can be overridden with _MSN env vars
…the dead startup time is being spent
…it (getAllSrcFiles) was exposed, optimized it. 3.5s -> 79ms for indexFiles
… recursive function to a worklist for walking directories
|
||
const schema = z.object({ | ||
agent_name: z.string().describe("Name of the agent to invoke"), | ||
prompt: z.string().describe("Prompt to run with the agent"), | ||
}); | ||
|
||
|
||
// a hack to clear the async local storage langchain uses to send events to the correct stream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Let's move this to a separate file?
Also, generally, any code that executes on import is likely coming back to haunt you at some point in time. Putting it in an init
function and requiring an explicit goal might be a better idea.
* Fix passing of `CodeContext` among agents and tools. * Add `boxen`. * Fix `indexFiles` to only do its job once. * Fix `gitignore` handling in subdirectories in `getAllSrcFiles`. * Add `runAgentPrompt`
switch to a dynamic import so we can maybe register some instrumentation plugins before importing the code we want to instrument save the service name as well, clean up some snake_case, and add the msn fields to all agent spans a lot more instrumentation fixes
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected] |
…round into toshok/typescript-port
code-monkey-ts2/instrumentation.ts
Outdated
export function instrument<T extends (...args: any) => any>( | ||
type ValueOfPromise<T> = T extends Promise<infer U> ? U : never; | ||
|
||
function isPromise<T>(value: unknown): value is Promise<ValueOfPromise<T>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, people use isThenable
instead of isPromise
.
No description provided.