mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 03:34:22 +01:00
codegen
This commit is contained in:
@@ -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>) {
|
||||
|
||||
Reference in New Issue
Block a user