{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":696,"path":"api-reference/scripts/tracking-ai-generated-code.md","title":"Tracking AI-generated code","bundle":null,"doc_type":null,"release":"australia","body":"\n# Tracking AI-generated code\n\nControl when to track and indicate that code is AI-generated.\n\nWhen you accept a code suggestion, the lines of code that are AI-generated are tracked and indicated by a line next to the line numbers in script editors. If you edit AI-generated code, the line indicator doesn’t appear for those lines of code.\n\nYou can turn on and off tracking of AI-generated code and configure how long to record and indicate AI-generated code in script editors. By default, AI-generated code is recorded and indicated for six months.\n\n## Configure how long to indicate AI-generated code\n\nShow that the code was generated by AI in script editors for a specified duration after accepting code suggestions.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  In the navigation filter, enter `sys_auto_flush.list`, and press the Enter key.\n\n2.  Filter the Auto Flushes \\[sys\\_auto\\_flush\\] list by entering **sn\\_now\\_assist\\_code\\_ai\\_generated\\_lines** in the **Tablename** column filter.\n\n3.  Select **sn\\_now\\_assist\\_code\\_ai\\_generated\\_lines** to open the record.\n\n4.  In the **Age in seconds** field, enter the duration to record and indicate AI-generated code after its creation in seconds.\n\n5.  Select **Update**.\n\n\n### Result\n\nAI-generated code is tracked and indicated. However, AI-generated code created before the configured duration isn’t recorded or indicated in script editors.\n\n## Turn off tracking AI-generated code\n\nTurn off tracking and indicating which code is AI-generated.\n\n### Before you begin\n\nRole required: admin\n\n### About this task\n\nTracking and indicating which code is AI-generated involves changes that are included in update sets. If you don't want to include changes related to this in update sets, you can turn off tracking and indicating AI-generated code.\n\n### Procedure\n\n1.  In the navigation filter, enter `sys_properties.list` and press the Enter key.\n\n2.  Filter the System Properties \\[sys\\_properties\\] list by entering **sn\\_now\\_assist\\_code.show\\_ai\\_code\\_line\\_marker** in the **Name** column filter.\n\n3.  Select **sn\\_now\\_assist\\_code.show\\_ai\\_code\\_line\\_marker** to open the property record.\n\n4.  In the **Value** field, enter `false`.\n\n5.  Select **Update**.\n\n\n### Result\n\nAI-generated code isn’t recorded or indicated in script editors.\n\n"}}