Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 3.81 KB

File metadata and controls

58 lines (46 loc) · 3.81 KB

Goal

This is the repo for a vscode extension, and you need to write the code.

The extension will be triggered when the user type in the editor, or when user is reading something in the file editor.

Requirements

The extension should

  1. Get the content that is shown in the editor.
  2. Understand the content
    1. Is is code?
      1. If it is code, what's the programming language
      2. What's the syntax of the language
    2. If it is not code, understand what the content is about roughly.
  3. Once you understand the content, generate a sentence to praise/cheerlead the user. Make sure
    1. The generated sentence should NOT come from no where, instead, it should align closely with what the using is reading/typing. It should be creative, but should not be unhinged.
    2. Generate the sentence in a tone that assuming you are a cute/moe cheerleading girl.
  4. After the sentence is generated, call the mimo-v2-tts API to synthesize the audio with a tone of a cute/moe girl.
  5. Play the generate audio.
  6. Repeat above process every 30 seconds.

Notes

  1. Write the code in typescript.
  2. The code should be concise, don't be too verbose and write many useless stuffs. Assume you are a senior software engineer.
  3. The code should have enough unit test.
  4. Also do integration test to try the tool and make sure it works.
  5. Documentation about mimo-v2-tts model: https://platform.xiaomimimo.com/#/docs/usage-guide/speech-synthesis
  6. vscode extension documentation: https://code.visualstudio.com/api
  7. DO NOT update this file.

Updated requirements 1

  1. When the voice/audio is played, there was a audio player window showed up. That's disturbing, and we should avoid that. Use a player that doesn't have UI, or maybe consider to include a build in player in the extension.
  2. Add more praise messages, and add Chinese version, have a config for user to choose language. Make the messages cute and funny.
  3. Allow generating messages through AI. If user provides an API key, generating the message from mimo-v2-flash instead of using the pre-defined messages. https://platform.xiaomimimo.com/#/docs/quick-start/model-hyperparameters
  4. Make the voice more cute and moe.

Updated requirements 2

  1. Remove the audio format config
  2. Remove config "Programming Cheerleader: Voice", just use the config user select for "Programming Cheerleader: Praise Language"
  3. Improve the edge cases for user experiences
    1. When user is not typing/updating anything, or when the editor is not on frontend or not focused, don't generate and play anything.
      1. When user didn't type anything or when the file in the editor is empty or the user didn't move the cursor (the text int the line is the same as previous), in those scenarios, we should not generate anything. Please fix this.
    2. When playing the audio, the first char is not always clear (it is like cutting half). Try to fix it like can we add an empty char in front of it.
    3. When generating the message with AI, do not add emoji in the output.
    4. Make the messages more "creative", i.e., not fully focusing on the code/text/content, but add some random/creative things to it. Otherwise it is getting boring very fast.
    5. When generating the praise message by AI, let AI to be a bit more "abstractive", don't work like code review or focusing too much on the details. Remember the praise message should from a cut/moe girl. Make the message have the girlie vibe.
    6. Allow user to choose male or female sound.
    7. For the pre-defined messages, generate their voice and store them in the extension. So if user doesn't provide a key for AI model, just use the local files.
    8. Allow user to fully config the AI models they want to use to generate praise message and do TTS. (like API endpoint, model name, API key)
      1. If user doesn't input any AI model key, use the static/pre-generated voice.