You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AndroidStudioSettings/ChatGPTConversations_170.xml

6 lines
38 KiB

<application>
<component name="ee.carlrobert.codegpt.state.conversations.ConversationsState">
<option name="currentConversation" value="{&quot;id&quot;:&quot;3c2624f7-3393-411c-924e-27c4d72d50db&quot;,&quot;title&quot;:null,&quot;messages&quot;:[{&quot;prompt&quot;:&quot;我用这个文件来设置git的preCommit的hook,想要实现在提交前自动格式化代码。现在的情况是在commit、push成功之后格式化才跑完需要执行二次commit,如何优化?&quot;,&quot;id&quot;:&quot;bfb12667-9e43-4d80-b798-b4c5bd0ffecb&quot;,&quot;response&quot;:&quot;出现这个问题的原因是:`dart fix` `dart format` ** Git Staging Area**Git \n\n### \n1. [preCommit](file:///home/debuggerx/StudioProjects/aim_master_workspace/tools/git_hooks.dart#preCommit) `sources` `List` Dart \n2. `dart format` `git add` commit \n\n\n\n```dart:/home/debuggerx/StudioProjects/aim_master_workspace/tools/git_hooks.dart\nimport 'package:git_hooks/git_hooks.dart';\nimport 'dart:io';\n\nvoid main(List&lt;String&gt; arguments) {\n if (arguments.isEmpty) {\n /// install\n var directory = Directory('.git/hooks/');\n if (!directory.existsSync()) {\n directory.createSync(recursive: true);\n }\n var file = File('.git/hooks/pre-commit');\n file.writeAsStringSync(r'''\n#!/bin/sh\n# !!!don\&quot;t edit this file\n# aim_workspace\n# Hook created by \n# Version: \n# At: 2025-10-20 10:39:19.343877\n# See: #readme\n\n# From\n# Homepage: #readme\n\nhookName=`basename \&quot;$0\&quot;`\ngitParams=\&quot;$*\&quot;\nDART_EXE=\&quot;dart\&quot;\nprogram_exists() {\n local ret=\&quot;0\&quot;\n command -v $1 &gt;/dev/null 2&gt;&amp;1 || { local ret=\&quot;1\&quot;; }\n if [ \&quot;$ret\&quot; -ne 0 ]; then\n flutterRoot=`grep '\&quot;flutterRoot\&quot;: \&quot;file://' .dart_tool/package_config.json`\n DART_EXE=\&quot;$(expr substr \&quot;$flutterRoot\&quot; 26 1000 | tr -d , | tr -d \\\&quot;)/bin/dart\&quot;\n local ret=\&quot;0\&quot;\n command -v $DART_EXE &gt;/dev/null 2&gt;&amp;1 || { local ret=\&quot;1\&quot;; }\n if [ \&quot;$ret\&quot; -ne 0 ]; then\n return 1\n fi\n fi\n return 0\n}\n\nif program_exists dart; then\n $DART_EXE tools/git_hooks.dart $hookName\n if [ \&quot;$?\&quot; -ne \&quot;0\&quot; ];then\n exit 1\n fi\nelse\n echo \&quot;git_hooks &gt; $hookName\&quot;\n echo \&quot;Cannot find dart in PATH\&quot;\nfi\n\n '''\n .trim());\n Process.runSync('chmod', ['a+x', file.path]);\n return;\n }\n // ignore: omit_local_variable_types\n Map&lt;Git, UserBackFun&gt; params = {Git.preCommit: preCommit};\n GitHooks.call(arguments, params);\n}\n\nFuture&lt;bool&gt; preCommit() async {\n ProcessResult result = await Process.run('git', ['diff', '--cached', '--name-only']);\n // Iterable List便使\n var sources = result.stdout.toString().split('\\n').where(\n (source) =&gt; source.toLowerCase().endsWith('.dart'),\n ).toList();\n \n // dart \n if (sources.isEmpty) return true;\n\n try {\n result = await Process.run(Platform.executable, ['fix', '--apply', '.']);\n stdout.writeln(result.stdout);\n stderr.writeln(result.stderr);\n if (result.exitCode != 0) return false;\n stdout.writeln('');\n \n result = await Process.run(Platform.executable, [\n 'format',\n '--page-width',\n '160',\n '--trailing-commas',\n 'preserve',\n ...sources,\n ]);\n stdout.writeln(result.stdou
<option name="conversations" value="[{&quot;id&quot;:&quot;2ea372bf-f79d-4805-a228-8cd51bf07dc9&quot;,&quot;title&quot;:null,&quot;messages&quot;:[{&quot;prompt&quot;:&quot;我在适用ProxyAI这个Intellij插件想要实现代码自动补全gemini系列的哪个模型最适合为什么另外配置里有个“FIM”模板选项我应该选什么&quot;,&quot;id&quot;:&quot;ab4b92a6-8055-4844-85d6-57ffd6339399&quot;,&quot;response&quot;:&quot;对于在 IntelliJ IDEA 使 ProxyAI **Inline Code Completion** Gemini FIM \n\n### Gemini 1.5 Flash Gemini 2.0 Flash\n\n**使 `gemini-1.5-flash` `gemini-2.0-flash`** API \n\n** Pro **\n1. **Latency** 300-500 `gemini-1.5-pro` Flash \n2. ****Flash 1M 2M ProxyAI \n3. ****Flash API Pro \n\n* `gemini-1.5-pro`****Flash *\n\n---\n\n### FIM \n\n**FIM (Fill-In-the-Middle)** PrefixSuffixMiddle\n\n**Gemini **\n DeepSeek CoderQwen Coder CodeLlama 使 FIM Token `&lt;|fim_prefix|&gt;``&lt;|fim_suffix|&gt;` **Gemini FIM ** ProxyAI Gemini `DeepSeek` `Qwen` FIM Gemini \n\n****\n\n1. ** Prompt / Instruction **\n ProxyAI FIM `Prompt``Instruction` `Gemini/OpenAI` \n\n2. **CustomFIM **\n FIM 使 XML Gemini XML \n ```text\n You are an expert programmer. Please complete the missing code between &lt;prefix&gt; and &lt;suffix&gt;. \n Output ONLY the missing code, without any markdown formatting, explanations, or repeating the prefix/suffix.\n \n &lt;prefix&gt;\n {prefix}\n &lt;/prefix&gt;\n &lt;suffix&gt;\n {suffix}\n &lt;/suffix&gt;\n ```\n *( `{prefix}` `{suffix}` ProxyAI )*\n\n3. ** FIM**\n FIM Gemini ProxyAI ** FIM ** None/Default退 Gemini &quot;,&quot;referencedFilePaths&quot;:null,&quot;conversationsHistoryIds&quot;:null,&quot;imageFilePath&quot;:null,&quot;
</component>
</application>