Skip to content

Improves code consistency, adds PID management, and enhances user prompts.#29

Merged
cfc4n merged 5 commits intomasterfrom
add-prompts
Apr 17, 2025
Merged

Improves code consistency, adds PID management, and enhances user prompts.#29
cfc4n merged 5 commits intomasterfrom
add-prompts

Conversation

@cfc4n
Copy link
Copy Markdown
Member

@cfc4n cfc4n commented Apr 17, 2025

This pull request introduces several changes to improve code consistency, enhance functionality, and add new features. Key updates include replacing string literals with a custom type for server names, implementing PID file management to prevent duplicate instances, and adding prompts for various functionalities. Additionally, there are updates to dependencies and refactoring for better modularity.

Code Consistency and Refactoring:

  • Replaced string literals for server names (e.g., BrowserServerName, CommandServerName) with the MoLingServerType custom type for better type safety and consistency. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-d28c280801f4a5ac525d036ee232b3823a6bdf7c800c3127cea2a2c1ef8e9d37L35-R36), [[2]](https://github.com/gojue/moling/pull/29/files#diff-255513b4527fd7bbbf2e847c570842c03e574d5974694b8ee056e8bc44a3def3L38-R38))
  • Updated logging and service initialization to use string() conversions where necessary for compatibility with the new type. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-d28c280801f4a5ac525d036ee232b3823a6bdf7c800c3127cea2a2c1ef8e9d37L59-R60), [[2]](https://github.com/gojue/moling/pull/29/files#diff-255513b4527fd7bbbf2e847c570842c03e574d5974694b8ee056e8bc44a3def3L64-R64))

New Features:

  • Added PID file management in mlsCommandFunc to prevent duplicate instances of the server. This includes creating and removing the PID file and handling timeouts during shutdown. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-eb154bbd601602eeae895e7af6a12b88cbdb7d585a2d32216c398f68cabcdff5R170-R178), [[2]](https://github.com/gojue/moling/pull/29/files#diff-eb154bbd601602eeae895e7af6a12b88cbdb7d585a2d32216c398f68cabcdff5L222-R283))
  • Introduced new constants such as MLPidName for PID file naming and updated MLROOTPATH to MLRootPath for consistency. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-eb154bbd601602eeae895e7af6a12b88cbdb7d585a2d32216c398f68cabcdff5L70-R73), [[2]](https://github.com/gojue/moling/pull/29/files#diff-eb154bbd601602eeae895e7af6a12b88cbdb7d585a2d32216c398f68cabcdff5L80-R83))

Dependency Updates:

  • Upgraded github.com/mark3labs/mcp-go to version v0.21.0 and updated other indirect dependencies for compatibility. ([go.modL7-R14](https://github.com/gojue/moling/pull/29/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6L7-R14))

Prompt Additions:

  • Added detailed multilingual prompts for filesystem, browser, and command-line management to enhance user interaction. These prompts include structured instructions and capabilities for each functionality. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-a34fe2c7669aa7fa6704860ed53b72e0998d9a84a61834f18d7e0b73411e0aeaR1-R69), [[2]](https://github.com/gojue/moling/pull/29/files#diff-4814356be1692906e394cdce7da9138d1f1207710e60e8c24e584fd2764b766bR1-R76), [[3]](https://github.com/gojue/moling/pull/29/files#diff-2a0847855513aab7412e8b56a153cb95993999ee896d00682c3838bdb1e387b3R1-R83))

Utility and Modularization:

  • Refactored directory creation functions to use the utils package instead of services for better modularity. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-1da78e247fa9e1955df2583ffcaaa486a6b59c5375b7659cb98c47167da4b9e1L20-R32), [[2]](https://github.com/gojue/moling/pull/29/files#diff-d28c280801f4a5ac525d036ee232b3823a6bdf7c800c3127cea2a2c1ef8e9d37L76-R86))
  • Removed unused or commented-out code to clean up the implementation, such as unused logger hooks in the browser server. ([[1]](https://github.com/gojue/moling/pull/29/files#diff-d28c280801f4a5ac525d036ee232b3823a6bdf7c800c3127cea2a2c1ef8e9d37L76-R86), [[2]](https://github.com/gojue/moling/pull/29/files#diff-d28c280801f4a5ac525d036ee232b3823a6bdf7c800c3127cea2a2c1ef8e9d37L475-R476))

cfc4n added 2 commits April 17, 2025 23:11
…d documentation

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
… enhance shutdown handling

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 17, 2025
@cfc4n cfc4n requested a review from Copilot April 17, 2025 15:48
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Apr 17, 2025
Copy link
Copy Markdown

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.

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • go.mod: Language not supported

cfc4n added 3 commits April 17, 2025 23:56
…flexibility

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
…formatting

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n merged commit ad6798d into master Apr 17, 2025
6 checks passed
@cfc4n cfc4n deleted the add-prompts branch April 17, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants