Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzcat01 committed Nov 6, 2024
1 parent 169b78d commit a0224ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/extension/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function streamResponse(request: StreamRequest) {
const { signal } = controller

try {
const url = `${options.protocol}://${options.hostname}${options.port && options.port !== "0" ? `:${options.port}` : ""}${options.path}`
const url = `${options.protocol}://${options.hostname}${options.port ? `:${options.port}` : ""}${options.path}`
const fetchOptions = {
method: options.method,
headers: options.headers,
Expand Down Expand Up @@ -94,7 +94,7 @@ export async function fetchEmbedding(request: StreamRequest) {


try {
const url = `${options.protocol}://${options.hostname}${options.port && options.port !== "0" ? `:${options.port}` : ""}${options.path}`
const url = `${options.protocol}://${options.hostname}${options.port ? `:${options.port}` : ""}${options.path}`
const fetchOptions = {
method: options.method,
headers: options.headers,
Expand Down
2 changes: 1 addition & 1 deletion src/extension/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ export function readGitIgnoreFile(): string[] | undefined {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const logStreamOptions = (opts: any) => {
const hostname = opts.options?.hostname ?? "unknown"
const port = opts.options?.port && opts.options.port !== "0" ? opts.options.port : null
const port = opts.options?.port ?? undefined
const body = opts.body ?? {}
const options = opts.options ?? {}

Expand Down

0 comments on commit a0224ed

Please sign in to comment.