Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Conversation

@jameshiew
Copy link
Owner

Summary

  • define constants for defaults like host, port, log settings, and index HTML
  • use constants in config, logging, handler and model defaults

Testing

  • cargo build
  • cargo test
  • cargo +nightly fmt (fails: unsuccessful tunnel)
  • rustup component add rustfmt (fails: unsuccessful tunnel)

https://chatgpt.com/codex/tasks/task_e_68401c443d00832687b33259bbeebe0c

@jameshiew jameshiew requested a review from Copilot June 4, 2025 10:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request extracts default configuration values into constants to improve maintainability and consistency.

  • Defined constants for default logging settings in src/logging.rs
  • Defined constants for server defaults in src/config.rs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/logging.rs Added DEFAULT_LOG_ANSI and DEFAULT_LOG_LEVEL constants and updated logger initialization.
src/config.rs Added DEFAULT_HOST and DEFAULT_PORT constants and updated get_server_addr to use these values.

@jameshiew jameshiew merged commit d7030f4 into main Jun 4, 2025
6 checks passed
@jameshiew jameshiew deleted the codex/replace-hardcoded-defaults-with-constants branch June 4, 2025 10:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants