mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
codegen
This commit is contained in:
parent
652429377b
commit
fa8a46326a
5 changed files with 14 additions and 13 deletions
|
|
@ -12,7 +12,7 @@ export namespace App {
|
|||
const ctx = Context.create<Info>("app");
|
||||
|
||||
export async function create(input: { directory: string }) {
|
||||
Log.file(input.directory);
|
||||
// Log.file(input.directory);
|
||||
log.info("creating");
|
||||
|
||||
const config = await Config.load(input.directory);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ export namespace Server {
|
|||
.get("/event", async (c) => {
|
||||
log.info("event connected");
|
||||
return streamSSE(c, async (stream) => {
|
||||
stream.writeSSE({
|
||||
data: JSON.stringify({}),
|
||||
});
|
||||
const unsub = Bus.subscribeAll(async (event) => {
|
||||
await stream.writeSSE({
|
||||
data: JSON.stringify(event),
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export namespace Log {
|
|||
})
|
||||
.map(([key, value]) => `${key}=${value}`)
|
||||
.join(" ");
|
||||
return [prefix, message].join(" ");
|
||||
return [prefix, message].join(" ") + "\n";
|
||||
}
|
||||
const result = {
|
||||
info(message?: any, extra?: Record<string, any>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue